From 04f5af182860589de1e60941031321019ea49c0d Mon Sep 17 00:00:00 2001 From: Daedilus Date: Mon, 16 Feb 2009 18:13:31 -0500 Subject: [PATCH] Added MSVC project templates for MM:S plugins (bug 3523). --- .../Install/BuildLog.htm | Bin 0 -> 9418 bytes .../MMSProjectTemplate.2005.vcproj | 160 ++++ .../MMSProjectTemplate.2008.vcproj | 165 ++++ .../VC/VCProjects/MMSProjectTemplate.ico | Bin 0 -> 5430 bytes .../VC/VCProjects/MMSProjectTemplate.vsz | 6 + .../Metamod/MMSProjectTemplate.vsdir | 1 + .../VC/VCProjects/Thumbs.db | Bin 0 -> 3072 bytes .../1033/Images/DottedHori.gif | Bin 0 -> 43 bytes .../1033/Images/DottedVert.gif | Bin 0 -> 43 bytes .../MMSProjectTemplate/1033/Images/spacer.gif | Bin 0 -> 43 bytes .../MMSProjectTemplate/1033/NewStyles.css | 782 ++++++++++++++++++ .../MMSProjectTemplate/HTML/1033/default.htm | 571 +++++++++++++ .../Images/MMSProjectTemplate.gif | Bin 0 -> 2115 bytes .../Images/MMSProjectTemplate_Background.gif | Bin 0 -> 811 bytes .../MMSProjectTemplate/Images/Thumbs.db | Bin 0 -> 12288 bytes .../Scripts/1033/default.js | 497 +++++++++++ .../Templates/1033/ReadMe.txt | 5 + .../Templates/1033/StdMMS.h | 44 + .../Templates/1033/Templates.inf | 8 + .../Templates/1033/plugin.vcproj | 212 +++++ .../Templates/1033/plugin.vdf | 5 + .../Templates/1033/plugin_engine.h | 124 +++ .../Templates/1033/plugin_hooks.cpp | 675 +++++++++++++++ .../Templates/1033/plugin_hooks.h | 278 +++++++ .../Templates/1033/plugin_mm.cpp | 215 +++++ .../Templates/1033/plugin_mm.h | 173 ++++ 26 files changed, 3921 insertions(+) create mode 100644 support/msvc_project_templates/Install/BuildLog.htm create mode 100644 support/msvc_project_templates/MMSProjectTemplate.2005.vcproj create mode 100644 support/msvc_project_templates/MMSProjectTemplate.2008.vcproj create mode 100644 support/msvc_project_templates/VC/VCProjects/MMSProjectTemplate.ico create mode 100644 support/msvc_project_templates/VC/VCProjects/MMSProjectTemplate.vsz create mode 100644 support/msvc_project_templates/VC/VCProjects/Metamod/MMSProjectTemplate.vsdir create mode 100644 support/msvc_project_templates/VC/VCProjects/Thumbs.db create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/DottedHori.gif create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/DottedVert.gif create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/spacer.gif create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/NewStyles.css create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/HTML/1033/default.htm create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/MMSProjectTemplate.gif create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/MMSProjectTemplate_Background.gif create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/Thumbs.db create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Scripts/1033/default.js create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/ReadMe.txt create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/StdMMS.h create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/Templates.inf create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vcproj create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vdf create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_engine.h create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.cpp create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.h create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.cpp create mode 100644 support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.h diff --git a/support/msvc_project_templates/Install/BuildLog.htm b/support/msvc_project_templates/Install/BuildLog.htm new file mode 100644 index 0000000000000000000000000000000000000000..741edf505edd8d68ccd4364d5c6b24c3e63a69a9 GIT binary patch literal 9418 zcmeI2Yfl?T6o${|Nc|5hszzm6#{I`rUp~54GD_+)7w7p znO%DqtYqB^LTt3!+g#3^`P{CS@?Z|sD>Ir{7u>eO28Uh}LBM_%!Ehm6{@gxWq( z2RsiL>4AMspA0wkDPp$={3hdNElz;Z8vgZxxd&}6MmV#WmVF?s0(F7wGfMZY?KpOT z)1&57sCnXd%^m{h5j}dmBmWXt^mUL@74fx8{}w%keay2%i-fOpFa6S%QfwYWQ%r4> z`k(0EPWfFKLepp!#>;RHqi26b3hn_#<94_bxGgMV_}>PTg|9whTvdOh|p}bE05uEJ6G4=h5c0scb;9eW)^}Hr_*$c`Bd6=F{x<9}<#qRP@^TCGUF7}-Px_F*CEoMcuP~B_mi5akUi8&L?!US8e_+gg z+H`5v1=j;gr4_F!?LvttxNCo6BVAyvxZO3tT)sI0+ik{3s14q6i#7vlWJwX27VS>$ z%h;!&RtuvRaaeaQ))}J<-vZPaeB}!g?gOxh-ig__j(L@5p0)_xPv}{J>cE8+&G9<&i3^J+QvESVWF59vLb-@P&)g^Rc|-4mP@(z#IXL&gL3*-=$2xIub?y{QPEmu{q8Zr|{eLDho-v#2 zGq2D*FJYFp&oj)!uG=cEmevhlXSAJ4&2%+C(weKu9)o7ZF|@aNYMy!h9^pgLz6}So zZk-j{vwaIuJ#92=uWXamS>D1mU)Fxn0Q;7d!_M2ZXn4`4%gpAdP3DtxV28E3cJBVb z+i4Xw@D<;*@ny?b-7&GU?{RY!^DbJ%t0{_h?uRQLHad`3@1`IMsrdM}*mv{*Lb}cJYB>#;ZB?taIUTCOM!zGp%`MRRaS3vm$%# zgDW?=$$OrefpWsLVfR|&i*Ds0wF;OGsxL=H?V%l~abFp#h>T{)f_+Xb_=5kCU5e3= zrgKR*ptglN x`H}J#5;>G{XJVA2(}@S|PppzV9)Bie{5hHbcLw2onVt%H>+HOb+K$dH{R=0SgGB%U literal 0 HcmV?d00001 diff --git a/support/msvc_project_templates/MMSProjectTemplate.2005.vcproj b/support/msvc_project_templates/MMSProjectTemplate.2005.vcproj new file mode 100644 index 0000000..f39238c --- /dev/null +++ b/support/msvc_project_templates/MMSProjectTemplate.2005.vcproj @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/support/msvc_project_templates/MMSProjectTemplate.2008.vcproj b/support/msvc_project_templates/MMSProjectTemplate.2008.vcproj new file mode 100644 index 0000000..189873a --- /dev/null +++ b/support/msvc_project_templates/MMSProjectTemplate.2008.vcproj @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/support/msvc_project_templates/VC/VCProjects/MMSProjectTemplate.ico b/support/msvc_project_templates/VC/VCProjects/MMSProjectTemplate.ico new file mode 100644 index 0000000000000000000000000000000000000000..9458598ff23d25ab7bd2b206a605153052c6f290 GIT binary patch literal 5430 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 diff --git a/support/msvc_project_templates/VC/VCProjects/Thumbs.db b/support/msvc_project_templates/VC/VCProjects/Thumbs.db new file mode 100644 index 0000000000000000000000000000000000000000..108453f08084658432fbd3941a88b01a7877aa42 GIT binary patch literal 3072 zcmca`Uhu)fjZzO8(10BSGsD0CoD6J8;*3Bx2!nwD0|OI~0pkDr|NlQkkbwcn90fxt z1pWfu3W`4vW`V}#5OV&gQz;CAAclM(EMZV!aAn8?(nSoFu&hiJEylnK&-3uI0f){6 zg|O3EDJL13LGqx)1_Xu>ifodFfr$|m1fa4AL=$U}KiClr49*ORKwl>^I8tLAjn=AK$61AC?CfkDJX}0H++5t;ynI3eynKRu+}r|U0)oOKqN1Wa{NfT~ zA`(I(q9Pze7@2{3SXen(Svf^`xp_rM2LBH*2y!q8FbFU+Dlsq#GBOJ?{y)MX4|F~& z(6t~3LjfZb(2Z>D9GqO-Km}WYIh2u^nTdrN(iUwW$pkka<)WpdpCN3cY31zV>gMj@=@lFj8WtWA z8I_!pnwFlCnN?g;T2@|BS=HRq+ScCD*)?hMl&RCE&zL!D(c&dbmn~nha@D5ITefc7 zzGLUELx+zXJ$C%W$y1juU%7hi`i+~n9zJ^f;%eAPcLaA)An6AbVn=u#!j7{Xt-7)Uvnx448vhx#-jfXbn>0nkh*2iYUQ<0oqrm*>zT*E3P1Cd9v%fW87g2F4 zJEG*JNw;Q+`!2)(49D9ptrJhs%|1Tb%na zqejPXL381j-p W3V?MMsP0N-&|}C1isu7$k`4d@_2x1F literal 0 HcmV?d00001 diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/DottedHori.gif b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/DottedHori.gif new file mode 100644 index 0000000000000000000000000000000000000000..67072b86b911943e4664cf91103194114267f0ba GIT binary patch literal 43 scmZ?wbhEHbWMW`sX!y@?;J^U}1_s5SEQ~;kK?g*DWEhy3T(}sl0n=;;MgRZ+ literal 0 HcmV?d00001 diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/DottedVert.gif b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/DottedVert.gif new file mode 100644 index 0000000000000000000000000000000000000000..72e0c7dcdf20d55e14f8ebacac19be1e09f09c1f GIT binary patch literal 43 scmZ?wbhEHbWMp7sX!y@?;J^U}1_s5SEQ~;kK?g*DWEhy3T(}sl0n=y)MgRZ+ literal 0 HcmV?d00001 diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/spacer.gif b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/spacer.gif new file mode 100644 index 0000000000000000000000000000000000000000..13acffe535d0accaae36bbbfce41477361081654 GIT binary patch literal 43 scmZ?wbhEHbWMp7uXkcJCaNqy~1B2pE7Dgb&paUX6G7L;iE{qJ;0JA{`JOBUy literal 0 HcmV?d00001 diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/NewStyles.css b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/NewStyles.css new file mode 100644 index 0000000..d8c46de --- /dev/null +++ b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/NewStyles.css @@ -0,0 +1,782 @@ +/******************************************************************************/ +/*DEFAULT STYLES FOR ALL SECTIONS**********************************************/ +/******************************************************************************/ +body { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; + font-weight: normal; + font-size: 8pt; + color: buttontext; + background-color: buttonface; + margin-top: 0px; + margin-left: 0px; + margin-right: 0px; + margin-bottom: 0px; + overflow: auto; } + +a:link { color: captiontext; + text-decoration: none; } + +a:visited { color: captiontext; + text-decoration: none; } + +a:active { color: captiontext; + text-decoration: none; } + +a:hover { color: captiontext; + text-decoration: underline; } + +table { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; + font-weight: normal; + font-size: 8pt; + color: buttontext; + width: 100%; } + +table.one { table-layout: fixed; + height: 100%; + width: 100%; } + + +/*DEFAULT STYLES FOR THE 'INTRODUCTION' TABLE**********************************/ +/******************************************************************************/ +table.two { table-layout: fixed; + height: 79px; + width: 100%; + background-color: window; } + +td.image { text-align: right; } + + +/*DEFAULT STYLES FOR THE 'NAVIGATION' TABLE************************************/ +/******************************************************************************/ +table.linkText { line-height: 95%; + width: 1.7in; + height: 2.6em; + position: relative; + left: 0.1in; + z-index: 2; } + +span { position: relative; + z-index: 3; } + +span.horiLine1 { height: 30px; + width: 166px; + position: absolute; + top: -1px; + left: -1px; + bottom: -1px; + z-index: 2; } + + +/*DEFAULT STYLES FOR THE ALL BUTTONS AND THE 'BUTTONS' TABLE*******************/ +/******************************************************************************/ +button { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; + font-weight: normal; + font-size: 8pt; + height: 23px; + cursor: hand; } + +.buttons { width: 100%; } + +/*DEFAULT STYLES FOR THE 'CONTENT' TABLE***************************************/ +/******************************************************************************/ +table.fixedSize { table-layout: fixed; } + +table.content { table-layout: fixed; + height: 100%; + width: 100%; } + +ol { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; + font-weight: normal; + font-size: 8pt; + color: buttontext; + margin-top: -1px; + margin-bottom: 16px; } + +ul { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; + font-weight: normal; + font-size: 8pt; + color: buttontext; + margin-top: 3px; + margin-bottom: 16px; } + +li { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; + font-weight: normal; + font-size: 8pt; + color: buttontext; + position: relative; + left: -15px; + margin-bottom: 1px; } + +span.itemTextTop { position: relative; } + +span.itemText { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; + font-weight: normal; + font-size: 8pt; + line-height: 9pt; + position: relative; + top: -3px; } + +span.itemTextIndent { position: relative; + left: 17px; + top: -3px; } + +span.sideBtnHidden { width: 100%; + margin-top: 3px; + margin-bottom: 0px; } + +div.itemTextRadioAa { position: relative; + top: -17px; + left: 17px; + margin-bottom: -25px; } + +div.itemTextRadioA { position: relative; + top: -19px; + left: 17px; + margin-bottom: -25px; } + +div.itemTextRadioB { position: relative; + top: -19px; + left: 25px; + margin-bottom: -25px; } + +div.itemTextRadioIndentA { position: relative; + top: -17px; + left: 30px; + margin-bottom: -25px; } + +div.itemTextRadioIndentB { position: relative; + top: -17px; + left: 42px; + margin-bottom: -25px; } + +div.itemTextCheckboxA { position: relative; + top: -17px; + left: 17px; + margin-bottom: -23px; } + +div.itemTextCheckboxB { position: relative; + top: -18px; + left: 25px; + padding-top: 1px; + margin-bottom: -25px; } + +div.itemTextCheckboxIndentB { position: relative; + top: -16px; + left: 42px; + margin-bottom: -25px; } + +input { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; + font-weight: normal; + font-size: 8pt; + color: buttontext; } + +select { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; + font-weight: normal; + font-size: 8pt; + color: buttontext; } + +.radio { position: relative; + top: -2px; + left: 4px; } + +.radioA { position: relative; + top: -1px; + margin-left: -4px; + z-index: 2; } + +.radioIndent { margin-top: -2px; + margin-left: 17px; } + +.radioIndentA { margin-top: -2px; + margin-left: 9px; } + +.checkbox { position: relative; + top: -1px; + margin-left: -4px; + z-index: 2; } + +.checkboxA { position: relative; + top: -2px; + left: 4px; } + +.checkboxIndent { position:relative; + margin-top: -1px; + margin-left: 21px; } + +.comment { width: 578px; + position: relative; + top: 5px; + bottom: 6px; } + +.commentA { width: 398px; + position: relative; + top: 5px; + bottom: 6px; } + +.commentB { width: 578px; + position: relative; + top: 3px; + bottom: -3px; } + +/****THIS IS THE STANDARD TABBED WIZARD, TWO COLUMN INPUT BOX******************/ +input.sideBtn { width: 193px; + position: relative; + top: 3px; } + +/****THIS IS THE STANDARD THREE COLUMN WIZARD INPUT BOX************************/ +input.sideBtnThreeColumn { width: 185px; + position: relative; + top: 3px; } + +/****THIS IS THE DEFAULT INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD***********/ +input.itemTextTwoColumnLong { width: 283px; + position: relative; + top: 3px; } + +/****THIS IS AN INPUT BOX INDENTED UNDER A CHECKBOX SECTION********************/ +input.sideBtnIndent { width: 175px; + position: relative; + top: 3px; + left: 18px; + bottom: 6px; } + +/****THIS INPUT BOX HAS IS INDENTED UNDER A HEADING AND RULE SECTION***********/ +input.sideBtnB { width: 185px; + position: relative; + top: 3px; + bottom: 6px; } + +input.sideBtnBA { width: 175px; + position: relative; + top: 3px; + bottom: 6px; } + +/****THIS INPUT BOX HAS A "..." BUTTON BESIDE IT AND IT'S A TABBED WIZARD******/ +input.sideBtn2 { width: 169px; + position: relative; + top: 3px; + bottom: 6px; } + +/****"..." BUTTON IN A NON-TABBED, 3 COLUMN WIZARD*****************************/ +input.sideBtn2ThreeColumn { width: 161px; + position: relative; + top: 3px; + bottom: 6px; } + +/****THIS IS AN INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON******/ +input.TwoColumnLongButton { width: 259px; + position: relative; + top: 3px; + bottom: 6px; } + +/****THIS INPUT BOX HAS A "..." BUTTON BESIDE IT AND IT'S UNDER A CHECKBOX*****/ +input.sidebtn2Indent { width: 151px; + position: relative; + top: 3px; + left: 18px; + bottom: 6px; } + +/****"..." BUTTON IS UNDER A SECTION IN A TWO COLUMN AND TABBED WIZARD*********/ +input.sidebtn21 { width: 161px; + position: relative; + top: 3px; + bottom: 6px; } + +/****"..." BUTTON IS UNDER A SECTION IN A THREE COLUMN AND TABBED WIZARD*********/ +input.sidebtn21A { width: 153px; + position: relative; + top: 3px; + bottom: 6px; } + +/****THIS IS THE STANDARD TABBED WIZARD, TWO COLUMN SELECTION BOX**************/ +select.sidebtn { width: 193px; + position: relative; + top: 4px; + bottom: -3px; } + +select.sidebtnNoWidth { position: relative; + top: 4px; + bottom: -3px; } + +/****THIS IS THE STANDARD TABBED WIZARD, ONE COLUMN SELECTION BOX**************/ +select.sideBtnOneCLong { width: 398px; + position: relative; + top: 3px; } + +/****THIS IS THE STANDARD THREE COLUMN WIZARD INPUT BOX************************/ +select.sideBtnThreeColumn { width: 185px; + position: relative; + top: 4px; + bottom: -3px; } + +/****THIS IS THE DEFAULT INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD***********/ +select.itemTextTwoColumnLong { width: 283px; + position: relative; + top: 4px; + bottom: -3px; } + +/****THIS SELECTION BOX IS INDENTED UNDER A HEADING AND RULE SECTION***********/ +select.sidebtnB { width: 164px; + position: relative; + top: 4px; + left: 8px; + bottom: -3px; } + +/****THIS SELECTION BOX IS BELOW AND ASSOCIATED WITH A CHECKBOX****************/ +select.sidebtn2 { width: 164px; + position: relative; + top: 11px; + left: 17px; + bottom: -3px; } + +select.sidebtnIndent { width: 175px; + position: relative; + top: 4px; + left: 18px; + bottom: -3px; } + +/****THIS SELECTION BOX IS BELOW AND ASSOCIATED WITH A CHECKBOX AND HEADING****/ +select.sidebtn2AShort { width: 168px; + position: relative; + top: 4px; + left: 25px; + bottom: -3px; } + +/****THIS SELECTION BOX IS IN A TABBED, TWO COLUM WIZARD AND FOR < << > >>*****/ +select.sidebtn3 { width: 177px; + position: relative; + top: 4px; + bottom: -3px; } + +/****THIS IS A SELECTION BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON***/ +select.TwoColumnLongButton { width: 259px; + position: relative; + top: 4px; + bottom: -3px; } + +/****THIS IS A SELECTION BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON***/ +select.IndentListBoxWithButton { width: 283px; + position: relative; + top: 4px; + bottom: -3px; + left: 18px; } + +/****THIS IS THE DEFAULT OBJECT DROP DOWN IN 2 COLUMN AND TABBED WIZARD********/ +object.itemtext { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; + font-weight: normal; + font-size: 8pt; + color: buttontext; + width: 193px; + height: 2em; + position: relative; + top: 4px; + margin-bottom: 0px; } + +/****THIS IS THE DEFAULT OBJECT DROP DOWN IN 3 COLUMN AND NON-TABBED WIZARD****/ +object.itemtextThreeColumn { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; + font-weight: normal; + font-size: 8pt; + color: buttontext; + width: 185px; + height: 2em; + position: relative; + top: 4px; + margin-bottom: 0px; } + +/****THIS IS THE DEFAULT OBJECT DROP DOWN IN NON-TABBED AND 2 COLUMN WIZARD****/ +object.itemTextTwoColumnLong{ font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; + font-weight: normal; + font-size: 8pt; + color: buttontext; + width: 283px; + height: 2em; + position: relative; + top: 4px; + margin-bottom: 0px; } + +.dropdowncombo { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; + font-weight: normal; + font-size: 8pt; + color: buttontext; } + +/****MOVES RADIO TEXT UP A BIT WHEN INLINE*************************************/ +span.upABit { position: relative; + top: -2px; } + +/****THIS DEFINES A STANDARD BUTTON IN THE CONTENT SECTION*********************/ +.buttonClass { margin-top: 0px; + margin-bottom: -6px; } + +/****THIS DEFINES ADD/REMOVE BUTTONS IN THE CONTENT SECTION********************/ +.buttonClass2 { width: 75px; + padding-top: 1px; + margin-top: 7px; } + +/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION OUT OF THE SPAN TAG****/ +.buttonClass3 { height: 19px; + width: 20px; + position: relative; + left: 1px; + top: 0px; } + +/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION WITHIN THE SPAN TAG***/ +.buttonClass3Custom { height: 19px; + width: 20px; + position: relative; + left: 4px; + top: 3px; } + +/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION AND UNDER A CHECKBOX***/ +.buttonClass3Indent { height: 19px; + width: 20px; + position: relative; + top: 0px; + left: 10px; } + +/****THIS DEFINES A ">>" BUTTON IN THE CONTENT SECTION************************/ +.buttonClass4 { margin-bottom: 4px; + width: 25px; } + +/****THIS DEFINES ADD/REMOVE BUTTONS HORIZONTALLY IN THE CONTENT SECTION******/ +.buttonClass5 { position: relative; + top: 4px; + width: 75px; } + +/****THIS SETS THE LEFT MARGIN FOR THE REMOVE BUTTON***************************/ +#removeBtn { margin-left: 4px; } + +/****THIS SETS THE LEFT MARGIN FOR INDENTED SECTION UNDER CHECKBOXES***********/ +label.indent { margin-left: 18px; } + +/****THIS SETS THE LEFT MARGIN FOR INDENTED SECTION UNDER CHECKBOXES***********/ +label.indent2 { margin-left: 25px; } + +/****THIS MOVES CHECK BOX AND RADIO TEXT UP A BIT******************************/ +label.upABit { position: relative; + top: -2px; } + +/****THIS BOLDS < << > >> BUTTONS**********************************************/ +b.bigFont { font-size: 135%; } + +/****THESE ARE CUSTOM VERTICAL SPACING ELEMENTS********************************/ +p.spacer { margin-bottom: -28px; } + +p.elementSpacer { margin-bottom: -12px; } + +p.elementSpacer2 { margin-bottom: -19px; } + +p.elementSpacer3 { margin-bottom: -3px; } + +p.elementSpacer4 { margin-bottom: 7px; } + +p.elementSpacer5 { margin-bottom: 5px; } + +p.elementSpacer6 { margin-bottom: -24px; } + +p.elementSpacer7 { margin-bottom: -11px; } + +p.elementSpacer8 { margin-bottom: -15px; } + +p.elementSpacer9 { margin-bottom: -7px; } + +p.elementSpacer10 { margin-bottom: 6px; } + +p.elementSpacer11 { margin-bottom: -1px; } + +p.elementSpacer12 { margin-bottom: -17px; } + +p.elementSpacer13 { margin-bottom: -23px; } + +p.elementSpacer14 { margin-bottom: -25px; } + +p.elementSpacer15 { margin-bottom: -13px; } + +p.elementSpacer16 { margin-bottom: -22px; } + +p.elementSpacer17 { margin-bottom: -32px; } + +p.elementSpacer18 { margin-bottom: -14px; } + +p.elementSpacer19 { margin-bottom: -10px; } + +p.elementSpacer21 { margin-bottom: -16px; } + +p.elementSpacer22 { margin-bottom: 3px; } + +/*CUSTOM STYLES FOR THE 'CONTENT' FRAME****************************************/ +/******************************************************************************/ + + /*CUSTOM SPACING FOR MFC UI PAGE - SET UP FOR LOC PURPOSES*******************/ + /**************************************************************************/ + p.elementSpacer20 { margin-bottom: -13px; } + + /*CUSTOM STYLE FOR MFC UI PAGE - SET UP FOR LOC PURPOSES*******************/ + /**************************************************************************/ + input.sideBtnLoc { width: 193px; + position: relative; + top: 3px; } + + /*PLACES SPACE BETWEEN ADD/REMOVE BUTTONS**********************************/ + /**************************************************************************/ + span.spacer8 { width: 1px; } + + /*SETS TEXT BOX TO APPROPRIATE WIDTH IN MFCAppWiz**************************/ + /**************************************************************************/ + #CLASS_NAMES { width: 399px; } + + /*MOVES SELECT BOX UP IN CSharpIndexerWiz, Interface, Method,**************/ + /*InterfaceMethod, AND MemFunctionWiz**************************************/ + #PARAMETER_LIST { margin-top: -1px; } + + /*MOVES SELECT BOX UP IN CSharpMethodWiz***********************************/ + /**************************************************************************/ + #PARAMETER_LIST1 { margin-top: -1px; } + + /*SETS SELECTION BOX WIDTH IN CSharpInterfaceMethod AND CSharpMethodWiz****/ + /**************************************************************************/ + #PARAMETER_MODIFIER { width: 58px; } + + /*SETS INDENT FOR ATLCustom AND MFCCustom Wizards**************************/ + /**************************************************************************/ + span.itemTextIndent1 { position: relative; + left: 8px; + top: -3px; } + + /*SETS INDENT ON OBJECT FOR CSharpMethodWiz********************************/ + /**************************************************************************/ + span.customObjectIndent { margin-left: 8px; } + + /*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/ + /**************************************************************************/ + span.sidebtn { position: relative; + top: 4px; + bottom: -3px; } + + /*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/ + /**************************************************************************/ + span.itemtextspecial { position: relative; + top: -20px; + left: 9px; + bottom: -3px; } + + /*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/ + /**************************************************************************/ + span.sidebtnspecial { position: relative; + top: -2px; + left: 53px; + bottom: -3px; } + + /**************************************************************************/ + + + + + /*MODIFIED POSITIONING*****************************************************/ + /**************************************************************************/ + /*Position and border change + link to the script file (absolutely needed)!!*/ + table.three { table-layout: fixed; + height: 100%; + position: absolute; + left: -1px; + border-right: solid 2px Window; } + + /*Color change*/ + span.activeLink { color: WindowText; + text-decoration: none; + word-wrap: break-word; + cursor: hand; + width: 100%; + padding-top: 1px; + padding-bottom: 1px; } + + /*Color change*/ + span.activeLink2 { color: WindowText; + text-decoration: underline; + word-wrap: break-word; + cursor: hand; + width: 100%; + padding-top: 1px; + padding-bottom: 1px; } + + /*Color change*/ + span.inactiveLink { color: GrayText; + text-decoration: none; + word-wrap: break-word; + cursor: default; + width: 100%; + padding-top: 1px; + padding-bottom: 1px; } + + /*Turned off dotted line*/ + span.vertLine1 { height: 100%; + width: 1px; + position: absolute; + top: 0px; + left: -1px; + bottom: 0px; + z-index: 2; } + + /*Style for width-control of the left-side links bar */ + .LinkPane { width: 1.9in; } + + /*Removed bolding of text*/ + table.linkTextSelected { line-height: 95%; + width: 1.7in; + height: 2.6em; + position: relative; + left: 0.1in; + z-index: 2; } + + /*Removed bolding of text and made width bigger*/ + table.linkTextSelectedIndent { line-height: 95%; + width: 1.7in; + height: 2.6em; + position: relative; + top: -2px; + left: 0.2in; + z-index: 2; } + + /*Changed left margin and position of top of element and made width bigger*/ + table.linkTextIndent { line-height: 95%; + width: 1.6in; + height: 2.6em; + position: relative; + top: -2px; + left: 0.2in; + z-index: 2; } + + /*Removed background color, changed top, and bottom margins*/ + div.linkSelected { height: 2.6em; + position: relative; + top: -6px; + left: 0px; + right: 0px; + z-index: 1; + margin-bottom: -.7em; } + + /*Changed top and bottom margins*/ + div.link { height: 2em; + position: relative; + top: -6px; + left: 0px; + right: 0px; + z-index: 1; + margin-bottom: -.7em; } + + /*Comment out + div.vertLine { background: url(Images/DottedVert.gif) repeat; + height: 125%; + width: 1px; + position: relative; + top: -12px; + left: -1px; }*/ + + /*Deleted dotted line*/ + span.vertLine1 { height: 100%; + width: 1px; + position: absolute; + top: 0px; + left: -1px; + bottom: 0px; + z-index: 2; } + + /*Changed background color and add alpha*/ + td.three { background-color: Window; + filter: Alpha(Opacity = 25); } + + /*Removed all background image modification elements and set image to 0 opacity*/ + td.threeCustom { filter: Alpha(Opacity = 0); } + + + /*Comment out + td.dottedline { background: url(Images/DottedHori.gif) repeat; }*/ + + /*Removed border color*/ + div.inlineA { position: relative; + top: 4px; + width: 100%; + height: 1px; } + + /*Changed border color*/ + div.inlineB { position: relative; + top: -9px; + margin-bottom: -20px; + width: 100%; + height: 1px; + border-top: solid ThreeDShadow 1px; } + + /*Changed position of element*/ + h4.head { font-weight: bold; + font-size: 10pt; + color: windowtext; + position: absolute; + top: 16px; + left: 120px; + height: 58px; } + + /*Hide element*/ + p.subhead { display: none; + color: windowtext; + position: relative; + top: -1.5em; + left: 1em; } + + /*Changed alignment to right*/ + td.image { text-align: left; } + + /*Added item to control positioning of element*/ + div.smallA { position: absolute; + top: 0px; + left: 12px; + height: 78px; + width: 110px; + vertical-align: bottom; } + + /*Added item to control positioning of element - 1 misspelling in html so dup of above*/ + div.smalA { position: absolute; + top: 0px; + left: 12px; + height: 78px; + width: 110px; + vertical-align: bottom; } + + /*Added item to control positioning of element*/ + div.small { position: absolute; + top: 0px; + left: 12px; + height: 78px; + width: 110px; + vertical-align: bottom; } + + /*Added all positioning informaiton*/ + img.smallest { background-color: activecaption; + position: relative; + bottom: 1px; } + + /*Added item to control positioning of element*/ + img.small { position: relative; + bottom: 1px; } + + /*Add height specification*/ + td.rule { background-color: window; + height: 1px; } + + /*Info for new button*/ + #PreviousBtn { position: relative; + right: -79px; } + /*Info for new button*/ + #NextBtn { position: relative; + right: -79px; } + + /*Reposition button*/ + #FinishBtn { position: relative; + right: -79px; } + + /*Reposition button*/ + #CancelBtn { position: relative; + right: -79px; } + + /*Hide button*/ + #HelpBtn { display: none; } + + + /**************************************************************************/ diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/HTML/1033/default.htm b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/HTML/1033/default.htm new file mode 100644 index 0000000..e52744c --- /dev/null +++ b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/HTML/1033/default.htm @@ -0,0 +1,571 @@ + + + + 'MMSProjectTemplate' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+   + +   + +   + +
+ +
+
+   +
+   + + +

+

+
+   +
+ + + + + +
+ +
+
+
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+   +
+   + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Author:  This is the name of the author.
+
+
+ URL:  This is the URL to the author's web site
+
+
+ License:  This is the plugin's license.
+
+
+ Plugin Name:  This is the name of the plugin.
+
+
+ Plugin Description:  This is the plugin's description.
+
+ Plugin DLL:  This is the name of the plugin's .dll file.
+
+ Plugin Class:   This is the name of the plugin's class.
+
+
+ + + + + +
+ Function Hooks:  These functions will be auto generated. 
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+
+
+
+   +
+   +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+   +
+   + +   + + + +   + + + +   + + + +   +
+   +
+ +
+ +
+ + + + + + + + + + + + + diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/MMSProjectTemplate.gif b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/MMSProjectTemplate.gif new file mode 100644 index 0000000000000000000000000000000000000000..b0206c76b13b1a52c97ab2b03843c405a6187d6c GIT binary patch literal 2115 zcmV-J2)y@4Nk%w1VJrYF0QUd@00030|NpiD0?z~mhXe(n1_#3u6Q>s#a~~p-k&~^g zvwM8qla%FCQ-P0<+(ScSqN3b7I!>~(%Cxk+hlh=Md44S|FP4^^BO@edXJ}VfSiZi$gogHq ziRyH9v}R|Pl9SAbh__KvY=eZSmzcH6%jAKAn6$Ob00{{P8ygZKAq*824Hgy;85txv zI3hAK5Ed37C@3s7H76}CBq=En5)v~vHw_LB4-gO)78WovG8ro-2O<#x3CBto|Y~yEG;c7M@L0MLO@MTOFTR~J3BgxiilKHQ$$2VdU|=Mr>2sR zUmhJ3b8%pciiUxJeJLm=g@b@IGBGtYGfPTIWn^P*Y-`!r*UQSuyt}$Kc74f6v7+5-a}0RgiS5poO+O$-Z(A0H_X4`C%GODrrsDk=m60~r()IWjU6 z5fMB&ITRBU7Zw&TEiE=QG$bP z{QCO(_4W1g^78KP?(FRB=;-L@=jY+!;osli+uPgO+1b_A)zZ?^(b3Vy#>Tx> zB_$;yA|fClARiwe9UUDU92^@P8yXrK85tQE7#I{36cQ2=4h{|t4Gjqi2?qxU1Ox;F z0|Nm80ssI1A^8LW00930EC2ui04xA3000R800RgdNU$I&RknJCa+6J(Fa@ki6`V-1 zVnI~4ggJXg?bEhy;Kp%_lggq=ldE(kOU8`jHEkfnokO9_)ybO#RqZ-PESa)q(WqhD z_AMN_bV;(k!g=#lu3>P9A^WKU8#iy@jH+X&Z(2#F7FQSp*6UX=VWO^q1ozFGH#X%^ z>`Pz@EJamteEni(?b@b-f ziVZesyqJLHk7~7azXoGW5WdxH7q!I z@kR`W4K&<<9|R6O;Eyn*T$g|wCcF^C1^GG9!V8^J0}iaXzzlZSG0Zg-xS-;S-e57t zFgn_mi#y(k(M1FeG>`xpZKMzlGhl@9Km#(U;|~D#1e2g?ek9?|H)6~&hahEC^G-eQ za1xFfT3i9Zp8&)&3w!|(vko_Gn4nEBpycz8I_Yr24mO1_L$q8ez2G9yKN`OMn zqwpk=L_JBk)6SpnJh5i6qgXNyC-AgW&luq1v(7yJT(Zlxnzn)q9O$_7PCW5oat{*u zU_wqm`^d9~F0-JbDJD&UJEk==JjwaM(qmDiN{OONA@Srn95K8DV&N$TcW>+)gm_rU5 z%+%6LI^^hzY9>Pbu*45O_&|;xF*QPB&;YV@odUv;z(}Yj_eh0*V-L03<$) z;|?FD8Ka3ez7%7QI@%=v6V5v5gyV@3LL6|200kg&$Rj!wv56mc5%LKq$Go!3I!WN; ztI6SrBSa&IFoJ~@RwV975A_6NR~(&?^Nn8OU;%(WorIE=5tJZ8Koe6);Y1dQEW!g4 zY1oB_8RNL#%{&~O(@h+*xY3RfkRZZH6mlrA1rr4n0K^gMv;tNr>|i_&3h`7WjxupH zV-FFL3~)UiTvV|{0R-%D#3t6^R0=aFFh@Dg;f*KQ!W-~F0XERk4t4~g00Mvl6{--0 zN61fq?f?W+NYM;;pyM3KO8_pcfscLc0}1WmL=YSy07C=<5(pST{)*rz4KhU#k4lFb z)Uk$8uz??5u!kA{j=_d^03Zf)k90iYI<**tI_P04b%X;Gm%7wGE`bj(jNuG$fCa4VVhUKO1Pz)n z!zM1F4-@W#AN}A*$C9v#JLq8##fU>JN@JH(tYQ|o$VCF|P>fJC0~*qphBTnjj8F_C t7zv2O3S_Y$3UXej6sAChDq8W1Sjb`)2$cmaT+s?upu!YUvPeJx06RP3S6u)A literal 0 HcmV?d00001 diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/MMSProjectTemplate_Background.gif b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/MMSProjectTemplate_Background.gif new file mode 100644 index 0000000000000000000000000000000000000000..7615277ef0100ca715b82d80de876468bc3ebeb6 GIT binary patch literal 811 zcmV+`1JwLSNk%w1VX*)~0f7Giz`(!&001HR1OWg5001li0002706_sj0{?`MsmtvT zqnxzbi?iOm`wxcVNS5Y_rs~SJ?hD8AOxN~}=lag~{tpZahs2`sh)gP%%%<}RjY_A~ zs`ZM^YPa03_X`e-$K-YS={|^`_I7nD%c!-#&xX9S( z_y`#(IZ0V*d5M{+xyjk-`3V{-I!an`U)E>J4;(@dyAW^yUW|_`wJW_ zJWO0{e2ko|yv*F}{0to}JxyJ0eT|*1z0KY2{S6*2K2Bb4evY25zRuq6{th26KTlsD z699m(pU=PV-w*Jgz<>k?8Z3zLpu&U<7dmXn;Gsl_6Dv}@XfY#3i2n;TdffOiB*>8> z|8*pZvSiAYDq8|P=`tqEnKEleq>0m}&YUY@^4tmZr_h0?9v0hO3JB^ zk2f_+pc+AH53CBfKJe;5D-W;-$W|SB73x-$XDz0+npN#swm#j)g$qIK4zoS)qV;<) z2w%Qk>E@NY*Kh*Dixr1OtYfg_28v<+7RUA{5+tv*yl)7alde6!lZpQ6Yc2 z{MxlAy+Laay=~L8?cKP0+ilD{xbNY#i5nM=oZxAO%LAuo{@nR$=+mXQW<3h_Y}uW( zcjwN@dwB4h#FrB;h>J18 zc!-QO(rAc{IpSD|jy>{7h>t-6If#%&5-Et0Ng^4Dl1(xRh?7x5`G=HMQt5}4Sz_6T zmR)kmhnHc3xrdl#lBtK8X`-2jnr*U)hnsQ2d54^J(rJgCdE!}zo_+F3ho6B0I)|Wz z5-NwGi6R<@qKz^Nhog}~`i7*HQtF1KnPS?8rk!%iMsdlFdYo~(l}c)=Je{g)tElz` p+^eq63ae$Z-b$-Wtm4XRt{3gil006VxWpcViC literal 0 HcmV?d00001 diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/Thumbs.db b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/Thumbs.db new file mode 100644 index 0000000000000000000000000000000000000000..bf7a2900b51459018033b1c835ab3d0aa24a291d GIT binary patch literal 12288 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 C(Bk_5 literal 0 HcmV?d00001 diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Scripts/1033/default.js b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Scripts/1033/default.js new file mode 100644 index 0000000..6d9142d --- /dev/null +++ b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Scripts/1033/default.js @@ -0,0 +1,497 @@ +/////////////////////////////////////////////////////////////////////////////////////////// +// // +// // +// File: Default.js // +// // +// // +/////////////////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////////////////// +// Use wizard.ReportError to display a message box for debugging + +// wizard.ReportError("", true); + + +/////////////////////////////////////////////////////////////////////////////////////////// +// OnFinish + +function OnFinish(selProj, selObj) +{ + try + { + // Get the new project name and path + + var strProjectName = wizard.FindSymbol('PROJECT_NAME'); + var strProjectPath = wizard.FindSymbol('PROJECT_PATH'); + + var strProjectTemplateName = wizard.FindSymbol('PLUGIN_TEMPLATE_NAME'); // Defined in default.htm + + // Get the current date and add a symbol CURRENT_DATE + + var curr_time = new Date(); + + var month = curr_time.getMonth() + 1; + var day = curr_time.getDate(); + var year = curr_time.getFullYear(); + var today = year + '-' + month + '-' + day; + + wizard.AddSymbol('CURRENT_DATE', today); + + // Set the path to where the template is installed + + var strPluginPath = wizard.FindSymbol('PROJECT_TEMPLATE_PATH') + + "\\AppWiz\\Metamod\\" + + strProjectTemplateName + "\\"; + + wizard.AddSymbol('PLUGIN_INSTALL_PATH', strPluginPath); + wizard.AddSymbol('PLUGIN_SOURCE_FILES', "Plugin Source Files"); + wizard.AddSymbol('PLUGIN_HEADER_FILES', "Plugin Header Files"); + wizard.AddSymbol('PLUGIN_RESOURCE_FILES', "Resource Files"); + + // Create the custom project + + selProj = CreateCustomProject(strProjectName, strProjectPath); + + AddConfig(selProj, strProjectName); + AddFilters(selProj); + + // Create the custom .inf file + + var InfFile = CreateCustomInfFile(); + + AddFilesToCustomProj(selProj, strProjectName, strProjectPath, InfFile); + PchSettings(selProj); + + InfFile.Delete(); + + // Save the project + + selProj.Object.Save(); + } + + // Catch Exceptions + + catch(ex) + { + if(ex.description.length != 0) + { + SetErrorInfo(ex); + } + + return ex.number + } +} + +/////////////////////////////////////////////////////////////////////////////////////////// +// CreateCustomProject + +function CreateCustomProject(strProjectName, strProjectPath) +{ + try + { + // Create the project's solution + + var strInstallPath = wizard.FindSymbol('PLUGIN_INSTALL_PATH'); + var strProjTemplate = strInstallPath + '\\Templates\\1033\\plugin.vcproj'; + + if(wizard.FindSymbol("CLOSE_SOLUTION")) + { + var Solution = dte.Solution; + Solution.Close(); + + var strSolutionName = wizard.FindSymbol("VS_SOLUTION_NAME"); + + if(strSolutionName.length) + { + var strSolutionPath = strProjectPath.substr(0, strProjectPath.length - strProjectName.length); + + Solution.Create(strSolutionPath, strSolutionName); + } + } + + // Override the new solution with our custom plugin.vcproj file + + var oTarget = wizard.FindSymbol("TARGET"); + var strProjectNameWithExt = strProjectName + '.vcproj'; + + if(wizard.FindSymbol("WIZARD_TYPE") == vsWizardAddSubProject) + { + return oTarget.AddFromTemplate(strProjTemplate, strProjectNameWithExt).SubProject; + } + + return oTarget.AddFromTemplate(strProjTemplate, strProjectPath, strProjectNameWithExt); + } + + // Catch Exceptions + + catch(ex) + { + throw ex; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////// +// CreateCustomInfFile + +function CreateCustomInfFile() +{ + try + { + var fso = new ActiveXObject('Scripting.FileSystemObject'); + var TemporaryFolder = 2; + + var tfolder = fso.GetSpecialFolder(TemporaryFolder); + var strTempFolder = tfolder.Drive + '\\' + tfolder.Name; + var strWizTempFile = strTempFolder + "\\" + fso.GetTempName(); + + var strTemplatePath = wizard.FindSymbol('TEMPLATES_PATH'); + var strInfFile = strTemplatePath + '\\Templates.inf'; + + wizard.RenderTemplate(strInfFile, strWizTempFile); + + return fso.GetFile(strWizTempFile); + } + + // Catch Exceptions + + catch(ex) + { + throw ex; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////// +// DelFile + +function DelFile(fso, strWizTempFile) +{ + try + { + // Delete the file + + if(fso.FileExists(strWizTempFile)) + { + var tmpFile = fso.GetFile(strWizTempFile); + + tmpFile.Delete(); + } + } + + // Catch Exceptions + + catch(ex) + { + throw ex; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////// +// AddFilters + +function AddFilters(proj) +{ + // Our plugin.vcproj has filters +} + +/////////////////////////////////////////////////////////////////////////////////////////// +// AddConfig + +function AddConfig(proj, strProjectName) +{ + try + { + // Get the plugin dll name + + var plugin_dll = wizard.FindSymbol('PLUGIN_DLL'); + + if(plugin_dll.indexOf(".dll") < 0) + { + plugin_dll = plugin_dll + ".dll"; + } + + var project_exports = strProjectName.toUpperCase() + "_EXPORTS"; + project_exports = project_exports.replace(/ /g, "_") + ";"; + + // Debug - Original -> Configuration Properties -> C/C++ -> Preprocessor + + var config = proj.Object.Configurations('Debug - Original'); + var CLTool = config.Tools('VCCLCompilerTool'); + var LinkTool = config.Tools('VCLinkerTool'); + + CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; + LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; + + // Release - Original -> Configuration Properties -> C/C++ -> Preprocessor + + config = proj.Object.Configurations('Release - Original'); + CLTool = config.Tools('VCCLCompilerTool'); + LinkTool = config.Tools('VCLinkerTool'); + + CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; + LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; + + + // Debug - Orange Box -> Configuration Properties -> C/C++ -> Preprocessor + + config = proj.Object.Configurations('Debug - Orange Box'); + CLTool = config.Tools('VCCLCompilerTool'); + LinkTool = config.Tools('VCLinkerTool'); + + CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; + LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; + + // Release - Orange Box -> Configuration Properties -> C/C++ -> Preprocessor + + config = proj.Object.Configurations('Release - Orange Box'); + CLTool = config.Tools('VCCLCompilerTool'); + LinkTool = config.Tools('VCLinkerTool'); + + CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; + LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; + + + // Debug - Left 4 Dead -> Configuration Properties -> C/C++ -> Preprocessor + + config = proj.Object.Configurations('Debug - Left 4 Dead'); + CLTool = config.Tools('VCCLCompilerTool'); + LinkTool = config.Tools('VCLinkerTool'); + + CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; + LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; + + // Release - Left 4 Dead -> Configuration Properties -> C/C++ -> Preprocessor + + config = proj.Object.Configurations('Release - Left 4 Dead'); + CLTool = config.Tools('VCCLCompilerTool'); + LinkTool = config.Tools('VCLinkerTool'); + + CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; + LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; + } + + // Catch Exceptions + + catch(ex) + { + throw ex; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////// +// PchSettings + +function PchSettings(proj) +{ + // TODO: specify pch settings +} + +/////////////////////////////////////////////////////////////////////////////////////////// +// GetTargetName + +function GetTargetName(strName) +{ + try + { + var strTarget = strName; + var strPluginName = wizard.FindSymbol('PLUGIN_NAME'); + var strPluginClass = wizard.FindSymbol('PLUGIN_CLASS'); + + // Target ReadMe File + + if(strName == "ReadMe.txt") + { + strTarget = "ReadMe.txt"; + } + + // Target StdMMS File + + else if(strName == "StdMMS.h") + { + strTarget = "StdMMS.h"; + } + + // Target plugin_mm File + + else if(strName == "plugin_mm.h") + { + strTarget = "Plugin\\" + strPluginClass + ".h"; + } + + // Target plugin_mm File + + else if(strName == "plugin_mm.cpp") + { + strTarget = "Plugin\\" + strPluginClass + ".cpp"; + } + + // Target plugin_hooks File + + else if(strName == "plugin_hooks.h") + { + strTarget = "Plugin\\" + strPluginClass + "Hooks.h"; + } + + // Target plugin_hooks File + + else if(strName == "plugin_hooks.cpp") + { + strTarget = "Plugin\\" + strPluginClass + "Hooks.cpp"; + } + + // Target plugin_engine File + + else if(strName == "plugin_engine.h") + { + strTarget = "Plugin\\" + strPluginClass + "Engine.h"; + } + + // Target plugin_mm File + + else if(strName == "plugin.vdf") + { + if(strPluginName.length) + { + strPluginName = strPluginName.replace(/ /g, ""); + + strTarget = "Bin\\" + strPluginName + ".vdf"; + } + } + + return strTarget; + } + + // Catch Exceptions + + catch(ex) + { + throw ex; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////// +// AddFilesToCustomProj + +function AddFilesToCustomProj(proj, strProjectName, strProjectPath, InfFile) +{ + try + { + var vcProjectItems = proj.ProjectItems; + var vcProjectFilters = proj.Object.Filters; + + // Get references to the filters of the project + + var vcFilterSource = vcProjectFilters.Item(wizard.FindSymbol('PLUGIN_SOURCE_FILES')); + var vcFilterHeader = vcProjectFilters.Item(wizard.FindSymbol('PLUGIN_HEADER_FILES')); + var vcFilterRez = vcProjectFilters.Item(wizard.FindSymbol('PLUGIN_RESOURCE_FILES')); + + var strTemplatePath = wizard.FindSymbol('PLUGIN_INSTALL_PATH') + "Templates\\1033\\"; + var FileStream = InfFile.OpenAsTextStream(1, -2); + + // Process the template files + + while(!FileStream.AtEndOfStream) + { + var strLine = FileStream.ReadLine(); + + if(strLine == '') + { + continue; + } + + // Retrieve the file parameters + + var strName = strLine; + var strTargetFile = GetTargetName(strName); + var strTemplateFile = strTemplatePath + '\\' + strLine; + var strProjectFile = strProjectPath + '\\' + strTargetFile; + + // "true" will only copy the file from template_file + // to target_file without rendering / adding to the project + + var bCopyOnly = false; + var strExt = strName.substr(strName.lastIndexOf(".")); + + if(strExt == ".bmp" || + strExt == ".ico" || + strExt == ".gif" || + strExt == ".rtf" || + strExt == ".css") + { + bCopyOnly = true; + } + + wizard.RenderTemplate(strTemplateFile, strProjectFile, bCopyOnly); + + if(!KeepOutsideProject(strName)) + { + // Add source files to the 'Plugin Source Files' filter + + if(strExt == '.cpp' || + strExt == '.cxx' || + strExt == '.c') + { + vcFilterSource.AddFile(strTargetFile); + } + + // Add header files to the 'Plugin Header Files' filter + + else if(strExt == '.hpp' || + strExt == '.h') + { + vcFilterHeader.AddFile(strTargetFile); + } + + // Add resource files to the 'Resource Files' filter + + else if(strExt == '.rc2' || strExt == '.ico' || + strExt == '.gif' || strExt == '.bmp' || + strExt == '.vdf' || strExt == '.rc') + { + vcFilterRez.AddFile(strTargetFile); + } + + // Just add the rest to the project + + else + { + proj.Object.AddFile(strTargetFile); + } + } + } + + FileStream.Close(); + } + + // Catch Exceptions + + catch(ex) + { + throw ex; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////// +// KeepOutsideProject + +function KeepOutsideProject(strName) +{ + try + { + var bAdd = false; + + if(strName == "ReadMe.txt") + { + bAdd = true; + } + + return bAdd; + } + + // Catch Exceptions + + catch(ex) + { + throw ex; + } +} diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/ReadMe.txt b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/ReadMe.txt new file mode 100644 index 0000000..0608be9 --- /dev/null +++ b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/ReadMe.txt @@ -0,0 +1,5 @@ +======================================================================== + [!output PLUGIN_NAME] : Project Overview +======================================================================== + +MMS Plugin Project has created this [!output PLUGIN_NAME] project for you as a starting point. diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/StdMMS.h b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/StdMMS.h new file mode 100644 index 0000000..e48a4d8 --- /dev/null +++ b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/StdMMS.h @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// File: StdMMS.h +// Author: [!output PLUGIN_AUTHOR] +// Date: [!output CURRENT_DATE] +// +// License: [!output PLUGIN_LICENSE] +// +// This software is provided 'as-is', without any express or +// implied warranty. In no event will the authors be held liable +// for any damages arising from the use of this software. +// +// Based on code written by AlliedModders LLC. Sample Plugin +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _StdMMS_H +#define _StdMMS_H + +/////////////////////////////////////////////////////// +// Include Standard Headers + +#include + +/////////////////////////////////////////////////////// +// Include MetaMod Headers + +#include +#include +#include +#include + +/////////////////////////////////////////////////////// +// Include [!output PROJECT_NAME] Headers + +#include "Plugin/[!output PLUGIN_CLASS]Hooks.h" +#include "Plugin/[!output PLUGIN_CLASS].h" +#include "Plugin/[!output PLUGIN_CLASS]Engine.h" + +// TODO: Add your own headers here. + +// ex. #include "MyCode/MyInclude.h" + +#endif // _StdMMS_H diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/Templates.inf b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/Templates.inf new file mode 100644 index 0000000..51593be --- /dev/null +++ b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/Templates.inf @@ -0,0 +1,8 @@ +StdMMS.h +plugin_mm.h +plugin_mm.cpp +plugin_hooks.h +plugin_hooks.cpp +plugin_engine.h +plugin.vdf +ReadMe.txt diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vcproj b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vcproj new file mode 100644 index 0000000..6f17cdb --- /dev/null +++ b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vcproj @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vdf b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vdf new file mode 100644 index 0000000..73723db --- /dev/null +++ b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vdf @@ -0,0 +1,5 @@ +"Metamod Plugin" +{ + "alias" "[!output PLUGIN_NAME]" + "file" "Addons/Metamod/Plugins/[!output PLUGIN_NAME]/Bin/[!output PLUGIN_DLL]" +} diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_engine.h b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_engine.h new file mode 100644 index 0000000..89f437e --- /dev/null +++ b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_engine.h @@ -0,0 +1,124 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// File: [!output PLUGIN_CLASS]Engine.h +// Author: [!output PLUGIN_AUTHOR] +// Date: [!output CURRENT_DATE] +// +// License: [!output PLUGIN_LICENSE] +// +// This software is provided 'as-is', without any express or +// implied warranty. In no event will the authors be held liable +// for any damages arising from the use of this software. +// +// Based on code written by AlliedModders LLC. Sample Plugin +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _MMS_ENGINE_H +#define _MMS_ENGINE_H + +#include + +///////////////////////////////////////////////////////////////////////// +// Class [!output PLUGIN_CLASS] + +class [!output PLUGIN_CLASS]; + +///////////////////////////////////////////////////////////////////////// +// Episode One + +#if SOURCE_ENGINE == SE_EPISODEONE + +///////////////////////////////////////////////////////////////////////// + +#if !defined METAMOD_PLAPI_VERSION + +#define GetEngineFactory engineFactory +#define GetServerFactory serverFactory + +#define MM_Format snprintf +#define GetCGlobals pGlobals + +#else + +#error "Metamod:Source 1.6 is not supported on the old engine." + +#endif + +///////////////////////////////////////////////////////////////////////// +// Wrap the CCommand class so our code looks the same for both engines. + +class CCommand +{ + public: + + const char *ArgS() + { + return [!output PLUGIN_CLASS]::EngineServer->Cmd_Args(); + } + + int ArgC() + { + return [!output PLUGIN_CLASS]::EngineServer->Cmd_Argc(); + } + + const char *Arg(int index) + { + return [!output PLUGIN_CLASS]::EngineServer->Cmd_Argv(index); + } +}; + +#define CVAR_INTERFACE_VERSION VENGINE_CVAR_INTERFACE_VERSION +#define ENGINE_CALL(func) SH_CALL(m_engine_server, func) + +///////////////////////////////////////////////////////////////////////// +// Episode Orange Box or newer + +#elif SOURCE_ENGINE >= SE_ORANGEBOX + +#define ENGINE_CALL(func) SH_CALL([!output PLUGIN_CLASS]::EngineServer, func) +#define MM_Format g_SMAPI->Format + +#endif + +///////////////////////////////////////////////////////////////////////// +// Left 4 Dead engine removed these from IVEngineServer + +#if SOURCE_ENGINE >= SE_LEFT4DEAD + +inline int IndexOfEdict(const edict_t* edict) +{ + return (int)(edict - [!output PLUGIN_CLASS]::GlobalVars->baseEdict); +} + +inline edict_t* PEntityOfEntIndex(int entity_index) +{ + if (entity_index >= 0 && entity_index < [!output PLUGIN_CLASS]::GlobalVars->maxEntities) + { + return (edict_t *)([!output PLUGIN_CLASS]::GlobalVars->baseEdict + entity_index); + } + return NULL; +} + +#else + +inline int IndexOfEdict(const edict_t* edict) +{ + return [!output PLUGIN_CLASS]::EngineServer->IndexOfEdict(edict); +} + +inline edict_t* PEntityOfEntIndex(int entity_index) +{ + return [!output PLUGIN_CLASS]::EngineServer->PEntityOfEntIndex(entity_index); +} + +#endif + +///////////////////////////////////////////////////////////////////////// +// Define snprintf + +#if defined WIN32 && !defined snprintf +#define snprintf _snprintf +#endif + +#endif // _MMS_ENGINE_H diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.cpp b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.cpp new file mode 100644 index 0000000..268a5de --- /dev/null +++ b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.cpp @@ -0,0 +1,675 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// File: [!output PLUGIN_CLASS]Hooks.cpp +// Author: [!output PLUGIN_AUTHOR] +// Date: [!output CURRENT_DATE] +// +// License: [!output PLUGIN_LICENSE] +// +// This software is provided 'as-is', without any express or +// implied warranty. In no event will the authors be held liable +// for any damages arising from the use of this software. +// +// Based on code written by AlliedModders LLC. Sample Plugin +// +/////////////////////////////////////////////////////////////////////////////// + +#include "StdMMS.h" + +///////////////////////////////////////////////////////////////////////// +// Declare the Hooks + +[!if IServerGameDLL_ServerActivate] +SH_DECL_HOOK3_void(IServerGameDLL, ServerActivate, SH_NOATTRIB, 0, edict_t*, int, int); +[!endif] +[!if IServerGameDLL_GameInit] +SH_DECL_HOOK0(IServerGameDLL, GameInit, SH_NOATTRIB, 0, bool); +[!endif] +[!if IServerGameDLL_GameFrame] +SH_DECL_HOOK1_void(IServerGameDLL, GameFrame, SH_NOATTRIB, 0, bool); +[!endif] +[!if IServerGameDLL_GameShutdown] +SH_DECL_HOOK0_void(IServerGameDLL, GameShutdown, SH_NOATTRIB, 0); +[!endif] +[!if IServerGameDLL_LevelInit] +SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, 0, bool, char const*, char const*, char const*, char const*, bool, bool); +[!endif] +[!if IServerGameDLL_LevelShutdown] +SH_DECL_HOOK0_void(IServerGameDLL, LevelShutdown, SH_NOATTRIB, 0); +[!endif] +[!if IServerGameDLL_GetAllServerClasses] +SH_DECL_HOOK0(IServerGameDLL, GetAllServerClasses, SH_NOATTRIB, 0, ServerClass*); +[!endif] +[!if IServerGameDLL_GetTickInterval] +SH_DECL_HOOK0(IServerGameDLL, GetTickInterval, const, 0, float); +[!endif] +[!if IServerGameDLL_GetGameDescription] +SH_DECL_HOOK0(IServerGameDLL, GetGameDescription, SH_NOATTRIB, 0, const char*); +[!endif] + +[!if IServerGameClients_ClientActive] +SH_DECL_HOOK2_void(IServerGameClients, ClientActive, SH_NOATTRIB, 0, edict_t*, bool); +[!endif] +[!if IServerGameClients_ClientConnect] +SH_DECL_HOOK5(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, edict_t*, const char*, const char *, char *, int); +[!endif] +[!if IServerGameClients_ClientDisconnect] +SH_DECL_HOOK1_void(IServerGameClients, ClientDisconnect, SH_NOATTRIB, 0, edict_t*); +[!endif] +[!if IServerGameClients_ClientPutInServer] +SH_DECL_HOOK2_void(IServerGameClients, ClientPutInServer, SH_NOATTRIB, 0, edict_t*, char const *); +[!endif] +[!if IServerGameClients_ClientSettingsChanged] +SH_DECL_HOOK1_void(IServerGameClients, ClientSettingsChanged, SH_NOATTRIB, 0, edict_t*); +[!endif] +[!if IServerGameClients_ClientSetupVisibility] +SH_DECL_HOOK4_void(IServerGameClients, ClientSetupVisibility, SH_NOATTRIB, 0, edict_t*, edict_t*, unsigned char*, int); +[!endif] +[!if IServerGameClients_ClientEarPosition] +SH_DECL_HOOK2_void(IServerGameClients, ClientEarPosition, SH_NOATTRIB, 0, edict_t*, Vector*); +[!endif] +[!if IServerGameClients_PostClientMessagesSent] +SH_DECL_HOOK0_void(IServerGameClients, PostClientMessagesSent, SH_NOATTRIB, 0); +[!endif] +[!if IServerGameClients_ProcessUsercmds] +SH_DECL_HOOK7(IServerGameClients, ProcessUsercmds, SH_NOATTRIB, 0, float, edict_t*, bf_read*, int, int, int, bool, bool); +[!endif] +[!if IServerGameClients_GetPlayerLimits] +SH_DECL_HOOK3_void(IServerGameClients, GetPlayerLimits, const, 0, int&, int&, int&); +[!endif] +[!if IServerGameClients_GetPlayerState] +SH_DECL_HOOK1(IServerGameClients, GetPlayerState, SH_NOATTRIB, 0, CPlayerState*, edict_t*); +[!endif] +[!if IServerGameClients_GetReplayDelay] +SH_DECL_HOOK2(IServerGameClients, GetReplayDelay, SH_NOATTRIB, 0, int, edict_t*, int&); +[!endif] +[!if IServerGameClients_GetBugReportInfo] +SH_DECL_HOOK2_void(IServerGameClients, GetBugReportInfo, SH_NOATTRIB, 0, char*, int); +[!endif] +[!if IServerGameClients_SetCommandClient] +SH_DECL_HOOK1_void(IServerGameClients, SetCommandClient, SH_NOATTRIB, 0, int); +[!endif] +SH_DECL_HOOK2(IGameEventManager2, FireEvent, SH_NOATTRIB, 0, bool, IGameEvent*, bool); + +#if SOURCE_ENGINE >= SE_ORANGEBOX + +[!if IServerGameClients_NetworkIDValidated] +SH_DECL_HOOK2_void(IServerGameClients, NetworkIDValidated, SH_NOATTRIB, 0, const char *, const char *); +[!endif] +[!if IServerGameClients_ClientCommand] +SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t*, const CCommand&); +[!endif] + +#else + +[!if IServerGameClients_ClientCommand] +SH_DECL_HOOK1_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t*); +[!endif] + +#endif + + +///////////////////////////////////////////////////////////////////////// +// AddHooks + +void [!output PLUGIN_CLASS]::AddHooks() +{ + // Add the ServerGameDLL hooks + +[!if IServerGameDLL_ServerActivate] + SH_ADD_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedServerActivate, true); +[!endif] +[!if IServerGameDLL_GameInit] + SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameInit, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameInit, true); +[!endif] +[!if IServerGameDLL_GameFrame] + SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameFrame, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameFrame, true); +[!endif] +[!if IServerGameDLL_GameShutdown] + SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameShutdown, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameShutdown, true); +[!endif] +[!if IServerGameDLL_LevelInit] + SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelInit, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedLevelInit, true); +[!endif] +[!if IServerGameDLL_LevelShutdown] + SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedLevelShutdown, true); +[!endif] +[!if IServerGameDLL_GetAllServerClasses] + SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GetAllServerClasses, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetAllServerClasses, true); +[!endif] +[!if IServerGameDLL_GetTickInterval] + SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GetTickInterval, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetTickInterval, true); +[!endif] +[!if IServerGameDLL_GetGameDescription] + SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GetGameDescription, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetGameDescription, true); +[!endif] + + // Add the ServerGameClients hooks + +[!if IServerGameClients_ClientActive] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientActive, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientActive, true); +[!endif] +[!if IServerGameClients_ClientConnect] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientConnect, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientConnect, true); +[!endif] +[!if IServerGameClients_ClientDisconnect] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientDisconnect, true); +[!endif] +[!if IServerGameClients_ClientCommand] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientCommand, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientCommand, true); +[!endif] +[!if IServerGameClients_ClientPutInServer] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientPutInServer, true); +[!endif] +[!if IServerGameClients_ClientSettingsChanged] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientSettingsChanged, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientSettingsChanged, true); +[!endif] +[!if IServerGameClients_ClientSetupVisibility] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientSetupVisibility, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientSetupVisibility, true); +[!endif] +[!if IServerGameClients_ClientEarPosition] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientEarPosition, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientEarPosition, true); +[!endif] +[!if IServerGameClients_PostClientMessagesSent] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, PostClientMessagesSent, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedPostClientMessagesSent, true); +[!endif] +[!if IServerGameClients_ProcessUsercmds] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, ProcessUsercmds, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedProcessUsercmds, false); +[!endif] +[!if IServerGameClients_GetPlayerLimits] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, GetPlayerLimits, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetPlayerLimits, true); +[!endif] +[!if IServerGameClients_GetPlayerState] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, GetPlayerState, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetPlayerState, true); +[!endif] +[!if IServerGameClients_GetReplayDelay] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, GetReplayDelay, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetReplayDelay, true); +[!endif] +[!if IServerGameClients_GetBugReportInfo] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, GetBugReportInfo, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetBugReportInfo, true); +[!endif] +[!if IServerGameClients_SetCommandClient] + SH_ADD_HOOK_MEMFUNC(IServerGameClients, SetCommandClient, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedSetCommandClient, true); +[!endif] + +[!if IServerGameClients_NetworkIDValidated] + #if SOURCE_ENGINE >= SE_ORANGEBOX + + SH_ADD_HOOK_MEMFUNC(IServerGameClients, NetworkIDValidated, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedNetworkIDValidated, true); + + #endif +[!endif] +} + +///////////////////////////////////////////////////////////////////////// +// RemoveHooks + +void [!output PLUGIN_CLASS]::RemoveHooks() +{ + // Remove the ServerGameDLL hooks + +[!if IServerGameDLL_ServerActivate] + SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedServerActivate, true); +[!endif] +[!if IServerGameDLL_GameInit] + SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameInit, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameInit, true); +[!endif] +[!if IServerGameDLL_GameFrame] + SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameFrame, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameFrame, true); +[!endif] +[!if IServerGameDLL_GameShutdown] + SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameShutdown, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameShutdown, true); +[!endif] +[!if IServerGameDLL_LevelInit] + SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelInit, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedLevelInit, true); +[!endif] +[!if IServerGameDLL_LevelShutdown] + SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedLevelShutdown, true); +[!endif] +[!if IServerGameDLL_GetAllServerClasses] + SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GetAllServerClasses, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetAllServerClasses, true); +[!endif] +[!if IServerGameDLL_GetTickInterval] + SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GetTickInterval, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetTickInterval, true); +[!endif] +[!if IServerGameDLL_GetGameDescription] + SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GetGameDescription, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetGameDescription, true); +[!endif] + + // Remove the ServerGameClients hooks + +[!if IServerGameClients_ClientActive] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientActive, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientActive, true); +[!endif] +[!if IServerGameClients_ClientConnect] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientConnect, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientConnect, true); +[!endif] +[!if IServerGameClients_ClientDisconnect] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientDisconnect, true); +[!endif] +[!if IServerGameClients_ClientCommand] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientCommand, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientCommand, true); +[!endif] +[!if IServerGameClients_ClientPutInServer] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientPutInServer, true); +[!endif] +[!if IServerGameClients_ClientSettingsChanged] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientSettingsChanged, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientSettingsChanged, true); +[!endif] +[!if IServerGameClients_ClientSetupVisibility] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientSetupVisibility, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientSetupVisibility, true); +[!endif] +[!if IServerGameClients_ClientEarPosition] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientEarPosition, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientEarPosition, true); +[!endif] +[!if IServerGameClients_PostClientMessagesSent] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, PostClientMessagesSent, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedPostClientMessagesSent, true); +[!endif] +[!if IServerGameClients_ProcessUsercmds] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ProcessUsercmds, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedProcessUsercmds, true); +[!endif] +[!if IServerGameClients_GetPlayerLimits] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, GetPlayerLimits, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetPlayerLimits, true); +[!endif] +[!if IServerGameClients_GetPlayerState] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, GetPlayerState, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetPlayerState, true); +[!endif] +[!if IServerGameClients_GetReplayDelay] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, GetReplayDelay, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetReplayDelay, true); +[!endif] +[!if IServerGameClients_GetBugReportInfo] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, GetBugReportInfo, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetBugReportInfo, true); +[!endif] +[!if IServerGameClients_SetCommandClient] + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, SetCommandClient, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedSetCommandClient, true); +[!endif] + +[!if IServerGameClients_NetworkIDValidated] + #if SOURCE_ENGINE >= SE_ORANGEBOX + + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, NetworkIDValidated, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedNetworkIDValidated, true); + + #endif +[!endif] +} + + +[!if IServerGameDLL_ServerActivate] +///////////////////////////////////////////////////////////////////////// +// HookedServerActivate + +// The server is about to activate + +void [!output PLUGIN_CLASS]::HookedServerActivate(edict_t* edict_list, int edict_count, int client_max) +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameDLL_GameInit] +///////////////////////////////////////////////////////////////////////// +// HookedGameInit + +// This is called when a new game is started. (restart, map) + +bool [!output PLUGIN_CLASS]::HookedGameInit() +{ + // TODO: Implement Method + + RETURN_META_VALUE(MRES_IGNORED, true); +} + +[!endif] +[!if IServerGameDLL_GameFrame] +///////////////////////////////////////////////////////////////////////// +// HookedGameFrame + +// The server should run physics / think on all edicts + +void [!output PLUGIN_CLASS]::HookedGameFrame(bool simulating) +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameDLL_GameShutdown] +///////////////////////////////////////////////////////////////////////// +// HookedGameShutdown + +// This is called when a game ends (server disconnect, death, +// restart, load). NOT on level transitions within a game + +void [!output PLUGIN_CLASS]::HookedGameShutdown() +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameDLL_LevelInit] +///////////////////////////////////////////////////////////////////////// +// HookedLevelInit + +// Called any time a new level is started (after +// GameInit() also on level transitions within a game) + +bool [!output PLUGIN_CLASS]::HookedLevelInit(const char* map_name, char const* map_entities, char const* old_level, + char const* landmark_name, bool load_game, bool bkgnd) +{ + // TODO: Implement Method + + RETURN_META_VALUE(MRES_IGNORED, true); +} + +[!endif] +[!if IServerGameDLL_LevelShutdown] +///////////////////////////////////////////////////////////////////////// +// HookedLevelShutdown + +// Called when a level is shutdown (including changing levels) + +void [!output PLUGIN_CLASS]::HookedLevelShutdown() +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameDLL_GetAllServerClasses] +///////////////////////////////////////////////////////////////////////// +// HookedGetAllServerClasses + +// Gets the list of datatable classes to the engine. The engine +// matches class names from here with edict_t::classname to figure +// out how to encode a class's data for networking + +ServerClass* [!output PLUGIN_CLASS]::HookedGetAllServerClasses() +{ + // TODO: Implement Method + + RETURN_META_VALUE(MRES_IGNORED, NULL); +} + +[!endif] +[!if IServerGameDLL_GetTickInterval] +///////////////////////////////////////////////////////////////////////// +// HookedGetTickInterval + +// Get the simulation interval (must be compiled with identical values +// into both client and game .dll for MOD!!!). Right now this is only +// requested at server startup time so it can't be changed on the fly, etc. + +float [!output PLUGIN_CLASS]::HookedGetTickInterval() const +{ + // TODO: Implement Method + + RETURN_META_VALUE(MRES_IGNORED, 0.0f); +} + +[!endif] +[!if IServerGameDLL_GetGameDescription] +///////////////////////////////////////////////////////////////////////// +// HookedGetGameDescription + +// Returns string describing current .dll. +// e.g. TeamFortress 2, Half-Life 2 + +const char* [!output PLUGIN_CLASS]::HookedGetGameDescription() +{ + // TODO: Implement Method + + RETURN_META_VALUE(MRES_IGNORED, ""); +} + +[!endif] +[!if IServerGameClients_ClientActive] +///////////////////////////////////////////////////////////////////////// +// HookedClientActive + +// Client is going active. If load_game is true, don't +// spawn the player because its state is already setup. + +void [!output PLUGIN_CLASS]::HookedClientActive(edict_t* entity, bool load_game) +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameClients_ClientConnect] +///////////////////////////////////////////////////////////////////////// +// HookedClientConnect + +// Client is connecting to server (return false to reject the connection) +// You can specify a rejection message by writing it into reject + +bool [!output PLUGIN_CLASS]::HookedClientConnect(edict_t* entity, const char* name, const char* address, char* reject, int reject_len) +{ + // TODO: Implement Method + + RETURN_META_VALUE(MRES_IGNORED, true); +} + +[!endif] +[!if IServerGameClients_ClientDisconnect] +///////////////////////////////////////////////////////////////////////// +// HookedClientDisconnect + +// Client is disconnecting from server + +void [!output PLUGIN_CLASS]::HookedClientDisconnect(edict_t* entity) +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameClients_ClientCommand] +///////////////////////////////////////////////////////////////////////// +// HookedClientCommand + +// The client has typed a command at the console + +#if SOURCE_ENGINE >= SE_ORANGEBOX +void [!output PLUGIN_CLASS]::HookedClientCommand(edict_t* entity, const CCommand& args) +#else +void [!output PLUGIN_CLASS]::HookedClientCommand(edict_t* entity) +#endif +{ + // Verify the parameters + + #if SOURCE_ENGINE == SE_EPISODEONE + CCommand args; + #endif + + if(!entity || entity->IsFree()) + { + RETURN_META(MRES_IGNORED); + } + + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameClients_ClientPutInServer] +///////////////////////////////////////////////////////////////////////// +// HookedClientPutInServer + +// Client is connected and should be put in the game + +void [!output PLUGIN_CLASS]::HookedClientPutInServer(edict_t* entity, char const* name) +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameClients_ClientSettingsChanged] +///////////////////////////////////////////////////////////////////////// +// HookedClientSettingsChanged + +// A player changed one / several replicated cvars (name etc...) + +void [!output PLUGIN_CLASS]::HookedClientSettingsChanged(edict_t* edict) +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameClients_ClientSetupVisibility] +///////////////////////////////////////////////////////////////////////// +// HookedClientSetupVisibility + +// Determine PVS origin and set PVS for the player / view entity + +void [!output PLUGIN_CLASS]::HookedClientSetupVisibility(edict_t* view_entity, edict_t* client, unsigned char *pvs, int pvs_size) +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameClients_ClientEarPosition] +///////////////////////////////////////////////////////////////////////// +// HookedClientEarPosition + +// Get the ear position for a specified client + +void [!output PLUGIN_CLASS]::HookedClientEarPosition(edict_t* entity, Vector* ear_origin) +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameClients_PostClientMessagesSent] +///////////////////////////////////////////////////////////////////////// +// HookedPostClientMessagesSent + +// Let the game .dll do stuff after messages have been sent +// to all of the clients once the server frame is complete + +void [!output PLUGIN_CLASS]::HookedPostClientMessagesSent() +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameClients_ProcessUsercmds] +///////////////////////////////////////////////////////////////////////// +// HookedProcessUsercmds + +// A block of CUserCmds has arrived from the user, decode +// them and buffer for execution during player simulation + +float [!output PLUGIN_CLASS]::HookedProcessUsercmds(edict_t* player, bf_read* buf, int num_cmds, int total_cmds, + int dropped_packets, bool ignore, bool paused) +{ + // TODO: Implement Method + + RETURN_META_VALUE(MRES_IGNORED, 0.0f); +} + +[!endif] +[!if IServerGameClients_NetworkIDValidated] +///////////////////////////////////////////////////////////////////////// +// HookedNetworkIDValidated + +// A user has had their network id setup and validated + +void [!output PLUGIN_CLASS]::HookedNetworkIDValidated(const char* user_name, const char* network_id) +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameClients_GetPlayerLimits] +///////////////////////////////////////////////////////////////////////// +// HookedGetPlayerLimits + +// Get server max players and lower bound for the same + +void [!output PLUGIN_CLASS]::HookedGetPlayerLimits(int& min_players, int& max_players, int& default_max) const +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameClients_GetPlayerState] +///////////////////////////////////////////////////////////////////////// +// HookedGetPlayerState + +// For players, looks up the CPlayerState structure corresponding to the player + +CPlayerState* [!output PLUGIN_CLASS]::HookedGetPlayerState(edict_t* player) +{ + // TODO: Implement Method + + RETURN_META_VALUE(MRES_IGNORED, NULL); +} + +[!endif] +[!if IServerGameClients_GetReplayDelay] +///////////////////////////////////////////////////////////////////////// +// HookedGetReplayDelay + +// Returns number of delay ticks if player is in Replay mode (0 = no delay) + +int [!output PLUGIN_CLASS]::HookedGetReplayDelay(edict_t* player, int& entity) +{ + // TODO: Implement Method + + RETURN_META_VALUE(MRES_IGNORED, 0); +} + +[!endif] +[!if IServerGameClients_GetBugReportInfo] +///////////////////////////////////////////////////////////////////////// +// HookedGetBugReportInfo + +// Anything this game .dll wants to add to the bug reporter text +//(e.g., the entity/model under the picker crosshair) can be added here + +void [!output PLUGIN_CLASS]::HookedGetBugReportInfo(char* buf, int size) +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] +[!if IServerGameClients_SetCommandClient] +///////////////////////////////////////////////////////////////////////// +// HookedSetCommandClient + +// Sets the client index for the client who typed the command into his / her console + +void [!output PLUGIN_CLASS]::HookedSetCommandClient(int index) +{ + // TODO: Implement Method + + RETURN_META(MRES_IGNORED); +} + +[!endif] diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.h b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.h new file mode 100644 index 0000000..da90c19 --- /dev/null +++ b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.h @@ -0,0 +1,278 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// File: [!output PLUGIN_CLASS]Hooks.h +// Author: [!output PLUGIN_AUTHOR] +// Date: [!output CURRENT_DATE] +// +// License: [!output PLUGIN_LICENSE] +// +// This software is provided 'as-is', without any express or +// implied warranty. In no event will the authors be held liable +// for any damages arising from the use of this software. +// +// Based on code written by AlliedModders LLC. Sample Plugin +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _PLUGIN_HOOKS_H +#define _PLUGIN_HOOKS_H + +[!if IServerGameDLL_ServerActivate] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_SERVER_ACTIVATE + +#define DECL_HOOK_SERVER_ACTIVATE \ + \ + void HookedServerActivate(edict_t* edict_list, \ + int edict_count, \ + int client_max) + +[!endif] +[!if IServerGameDLL_GameInit] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_GAME_INIT + +#define DECL_HOOK_GAME_INIT \ + \ + bool HookedGameInit() + +[!endif] +[!if IServerGameDLL_GameFrame] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_GAME_FRAME + +#define DECL_HOOK_GAME_FRAME \ + \ + void HookedGameFrame(bool simulating) + +[!endif] +[!if IServerGameDLL_GameShutdown] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_GAME_SHUTDOWN + +#define DECL_HOOK_GAME_SHUTDOWN \ + \ + void HookedGameShutdown() + +[!endif] +[!if IServerGameDLL_LevelInit] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_LEVEL_INIT + +#define DECL_HOOK_LEVEL_INIT \ + \ + bool HookedLevelInit(const char* map_name, \ + char const* map_entities, \ + char const* old_level, \ + char const* landmark_name, \ + bool load_game, bool bkgnd) + +[!endif] +[!if IServerGameDLL_LevelShutdown] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_LEVEL_SHUTDOWN + +#define DECL_HOOK_LEVEL_SHUTDOWN \ + \ + void HookedLevelShutdown(); + +[!endif] +[!if IServerGameDLL_GetAllServerClasses] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_GET_ALL_SERVER_CLASSES + +#define DECL_HOOK_GET_ALL_SERVER_CLASSES \ + \ + ServerClass* HookedGetAllServerClasses() + +[!endif] +[!if IServerGameDLL_GetTickInterval] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_GET_TICK_INTERVAL + +#define DECL_HOOK_GET_TICK_INTERVAL \ + \ + float HookedGetTickInterval() const + +[!endif] +[!if IServerGameDLL_GetGameDescription] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_GET_GAME_DESC + +#define DECL_HOOK_GET_GAME_DESC \ + \ + const char* HookedGetGameDescription() + +[!endif] +[!if IServerGameClients_ClientActive] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_CLIENT_ACTIVE + +#define DECL_HOOK_CLIENT_ACTIVE \ + \ + void HookedClientActive(edict_t* entity, \ + bool load_game) + +[!endif] +[!if IServerGameClients_ClientConnect] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_CLIENT_CONNECT + +#define DECL_HOOK_CLIENT_CONNECT \ + \ + bool HookedClientConnect(edict_t* entity, \ + const char* name, \ + const char* address, \ + char* reject, \ + int reject_len) + +[!endif] +[!if IServerGameClients_ClientDisconnect] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_CLIENT_DISCONNECT + +#define DECL_HOOK_CLIENT_DISCONNECT \ + \ + void HookedClientDisconnect(edict_t* entity) + +[!endif] +[!if IServerGameClients_ClientCommand] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_CLIENT_COMMAND + +#if SOURCE_ENGINE >= SE_ORANGEBOX +#define DECL_HOOK_CLIENT_COMMAND \ + \ + void HookedClientCommand(edict_t* entity, \ + const CCommand& args) +#else +#define DECL_HOOK_CLIENT_COMMAND \ + \ + void HookedClientCommand(edict_t* entity) +#endif + +[!endif] +[!if IServerGameClients_ClientPutInServer] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_CLIENT_PUT_IN_SERVER + +#define DECL_HOOK_CLIENT_PUT_IN_SERVER \ + \ + void HookedClientPutInServer(edict_t* entity, \ + char const* name) + +[!endif] +[!if IServerGameClients_ClientSettingsChanged] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_CLIENT_SETTINGS_CHANGED + +#define DECL_HOOK_CLIENT_SETTINGS_CHANGED \ + \ + void HookedClientSettingsChanged(edict_t* edict) + +[!endif] +[!if IServerGameClients_ClientSetupVisibility] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_CLIENT_SETUP_VISIBILITY + +#define DECL_HOOK_CLIENT_SETUP_VISIBILITY \ + \ + void HookedClientSetupVisibility(edict_t* view_entity, \ + edict_t* client, \ + unsigned char *pvs, \ + int pvs_size) + +[!endif] +[!if IServerGameClients_ClientEarPosition] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_CLIENT_EAR_POSITION + +#define DECL_HOOK_CLIENT_EAR_POSITION \ + \ + void HookedClientEarPosition(edict_t* entity, \ + Vector* ear_origin) + +[!endif] +[!if IServerGameClients_PostClientMessagesSent] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_POST_CLIENT_MESSAGES_SENT + +#define DECL_HOOK_POST_CLIENT_MESSAGES_SENT \ + \ + void HookedPostClientMessagesSent() + +[!endif] +[!if IServerGameClients_ProcessUsercmds] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_PROCESS_USER_CMDS + +#define DECL_HOOK_PROCESS_USER_CMDS \ + \ + float HookedProcessUsercmds(edict_t* player, \ + bf_read* buf, \ + int num_cmds, \ + int total_cmds, \ + int dropped_packets, \ + bool ignore, \ + bool paused) + +[!endif] +[!if IServerGameClients_NetworkIDValidated] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_NETWORK_ID_VALIDATED + +#define DECL_HOOK_NETWORK_ID_VALIDATED \ + \ + void HookedNetworkIDValidated(const char* user_name, \ + const char* network_id) + +[!endif] +[!if IServerGameClients_GetPlayerLimits] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_GET_PLAYER_LIMITS + +#define DECL_HOOK_GET_PLAYER_LIMITS \ + \ + void HookedGetPlayerLimits(int& min_players, \ + int& max_players, \ + int& default_max) const + +[!endif] +[!if IServerGameClients_GetPlayerState] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_GET_PLAYER_STATE + +#define DECL_HOOK_GET_PLAYER_STATE \ + \ + CPlayerState* HookedGetPlayerState(edict_t* player) + +[!endif] +[!if IServerGameClients_GetReplayDelay] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_GET_REPLAY_DELAY + +#define DECL_HOOK_GET_REPLAY_DELAY \ + \ + int HookedGetReplayDelay(edict_t* player, \ + int& entity) + +[!endif] +[!if IServerGameClients_GetBugReportInfo] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_GET_BUG_REPORT_INFO + +#define DECL_HOOK_GET_BUG_REPORT_INFO \ + \ + void HookedGetBugReportInfo(char* buf, int size) + +[!endif] +[!if IServerGameClients_SetCommandClient] +///////////////////////////////////////////////////////////////////////// +// Define DECL_HOOK_SET_COMMAND_CLIENT + +#define DECL_HOOK_SET_COMMAND_CLIENT \ + \ + void HookedSetCommandClient(int index) + +[!endif] +#endif // _PLUGIN_HOOKS_H diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.cpp b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.cpp new file mode 100644 index 0000000..12f8699 --- /dev/null +++ b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.cpp @@ -0,0 +1,215 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// File: [!output PLUGIN_CLASS].cpp +// Author: [!output PLUGIN_AUTHOR] +// Date: [!output CURRENT_DATE] +// +// License: [!output PLUGIN_LICENSE] +// +// This software is provided 'as-is', without any express or +// implied warranty. In no event will the authors be held liable +// for any damages arising from the use of this software. +// +// Based on code written by AlliedModders LLC. Sample Plugin +// +/////////////////////////////////////////////////////////////////////////////// + +#include "StdMMS.h" + +///////////////////////////////////////////////////////////////////////// +// Global Variables + +IServerGameDLL* [!output PLUGIN_CLASS]::GameServer(NULL); +IServerGameClients* [!output PLUGIN_CLASS]::GameClients(NULL); +IVEngineServer* [!output PLUGIN_CLASS]::EngineServer(NULL); +IServerPluginHelpers* [!output PLUGIN_CLASS]::PluginHelpers(NULL); +IGameEventManager2* [!output PLUGIN_CLASS]::GameEvents(NULL); +IServerPluginCallbacks* [!output PLUGIN_CLASS]::VspCallbacks(NULL); +IPlayerInfoManager* [!output PLUGIN_CLASS]::PlayerInfoManager(NULL); +ICvar* [!output PLUGIN_CLASS]::CVar(NULL); +CGlobalVars* [!output PLUGIN_CLASS]::GlobalVars(NULL); + + +///////////////////////////////////////////////////////////////////////// +// Class BaseAccessor + +// This is needed to register cvars / CON_COMMANDs + +class BaseAccessor : public IConCommandBaseAccessor +{ + public: + + bool RegisterConCommandBase(ConCommandBase *pCommandBase) + { + // Always call META_REGCVAR instead + // of going through the [!output PLUGIN_CLASS]::EngineServer + + return META_REGCVAR(pCommandBase); + } +} +s_BaseAccessor; + + +/////////////////////////////////////////////////////////////////////////////// +// Expose the Plugin + +[!output PLUGIN_CLASS] [!output PLUGIN_CLASS]::Global; + +PLUGIN_EXPOSE([!output PLUGIN_CLASS], [!output PLUGIN_CLASS]::Global); + + +///////////////////////////////////////////////////////////////////////// +// Load + +bool [!output PLUGIN_CLASS]::Load(PluginId id, ISmmAPI* ismm, char* error, size_t maxlen, bool late) +{ + PLUGIN_SAVEVARS(); + + // Get the current Enginefactory interfaces + + GET_V_IFACE_CURRENT(GetEngineFactory, [!output PLUGIN_CLASS]::EngineServer, IVEngineServer, INTERFACEVERSION_VENGINESERVER); + GET_V_IFACE_CURRENT(GetEngineFactory, [!output PLUGIN_CLASS]::GameEvents, IGameEventManager2, INTERFACEVERSION_GAMEEVENTSMANAGER2); + GET_V_IFACE_CURRENT(GetEngineFactory, [!output PLUGIN_CLASS]::PluginHelpers, IServerPluginHelpers, INTERFACEVERSION_ISERVERPLUGINHELPERS); + GET_V_IFACE_CURRENT(GetEngineFactory, [!output PLUGIN_CLASS]::CVar, ICvar, CVAR_INTERFACE_VERSION); + + // Get the current ServerFactory interfaces + + GET_V_IFACE_ANY(GetServerFactory, [!output PLUGIN_CLASS]::GameServer, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL); + GET_V_IFACE_ANY(GetServerFactory, [!output PLUGIN_CLASS]::GameClients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS); + GET_V_IFACE_ANY(GetServerFactory, [!output PLUGIN_CLASS]::PlayerInfoManager, IPlayerInfoManager, INTERFACEVERSION_PLAYERINFOMANAGER); + + // Get the current Globals interfaces + + [!output PLUGIN_CLASS]::GlobalVars = ismm->GetCGlobals(); + + // Load the VSP listener. This is usually needed for IServerPluginHelpers + + #if defined METAMOD_PLAPI_VERSION + if (([!output PLUGIN_CLASS]::VspCallbacks = ismm->GetVSPInfo(NULL)) == NULL) + #endif + { + ismm->AddListener(this, this); + ismm->EnableVSPListener(); + } + + // Add the hooks + + AddHooks(); + + // Get the engine server interface + + #if SOURCE_ENGINE == SE_EPISODEONE + + m_engine_server = SH_GET_CALLCLASS([!output PLUGIN_CLASS]::EngineServer); + + #endif + + ENGINE_CALL(&IVEngineServer::LogPrint)("All hooks started!\n"); + + // Register the base accessor + + #if SOURCE_ENGINE >= SE_ORANGEBOX + + g_pCVar = [!output PLUGIN_CLASS]::CVar; + ConVar_Register(0, &s_BaseAccessor); + + #else + + ConCommandBaseMgr::OneTimeInit(&s_BaseAccessor); + + #endif + + return true; +} + +///////////////////////////////////////////////////////////////////////// +// Unload + +bool [!output PLUGIN_CLASS]::Unload(char *error, size_t maxlen) +{ + // Remove the hooks + + RemoveHooks(); + + // Release the engine server interface + + #if SOURCE_ENGINE == SE_EPISODEONE + + SH_RELEASE_CALLCLASS(m_engine_server); + + #endif + + return true; +} + +///////////////////////////////////////////////////////////////////////// +// OnVSPListening + +void [!output PLUGIN_CLASS]::OnVSPListening(IServerPluginCallbacks* vsp_callbacks) +{ + [!output PLUGIN_CLASS]::VspCallbacks = vsp_callbacks; +} + +///////////////////////////////////////////////////////////////////////// +// GetVersion + +const char* [!output PLUGIN_CLASS]::GetVersion() +{ + return "1.0.0.0"; +} + +///////////////////////////////////////////////////////////////////////// +// GetDate + +const char* [!output PLUGIN_CLASS]::GetDate() +{ + return __DATE__; +} + +///////////////////////////////////////////////////////////////////////// +// GetLogTag + +const char* [!output PLUGIN_CLASS]::GetLogTag() +{ + return "[!output PLUGIN_NAME]Log"; +} + +///////////////////////////////////////////////////////////////////////// +// GetLicense + +const char* [!output PLUGIN_CLASS]::GetLicense() +{ + return "[!output PLUGIN_LICENSE]"; +} + +///////////////////////////////////////////////////////////////////////// +// GetAuthor + +const char* [!output PLUGIN_CLASS]::GetAuthor() +{ + return "[!output PLUGIN_AUTHOR]"; +} + +///////////////////////////////////////////////////////////////////////// +// GetDescription + +const char* [!output PLUGIN_CLASS]::GetDescription() +{ + return "[!output PLUGIN_DESC]"; +} + +///////////////////////////////////////////////////////////////////////// +// GetName + +const char* [!output PLUGIN_CLASS]::GetName() +{ + return "[!output PLUGIN_NAME]"; +} + +///////////////////////////////////////////////////////////////////////// +// GetURL + +const char* [!output PLUGIN_CLASS]::GetURL() +{ + return "[!output PLUGIN_URL]"; +} diff --git a/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.h b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.h new file mode 100644 index 0000000..fe934a8 --- /dev/null +++ b/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.h @@ -0,0 +1,173 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// File: [!output PLUGIN_CLASS].h +// Author: [!output PLUGIN_AUTHOR] +// Date: [!output CURRENT_DATE] +// +// License: [!output PLUGIN_LICENSE] +// +// This software is provided 'as-is', without any express or +// implied warranty. In no event will the authors be held liable +// for any damages arising from the use of this software. +// +// Based on code written by AlliedModders LLC. Sample Plugin +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _PLUGIN_H +#define _PLUGIN_H + +///////////////////////////////////////////////////////////////////////// + +class CCommand; + +///////////////////////////////////////////////////////////////////////// +// Class [!output PLUGIN_CLASS] + +class [!output PLUGIN_CLASS] : public ISmmPlugin, public IMetamodListener +{ + //////////////////////////////////////// + // Plugin Interface + + public: + + virtual bool Load(PluginId id, + ISmmAPI* ismm, + char* error, + size_t maxlen, + bool late); + + virtual bool Unload(char* error, size_t maxlen); + virtual void OnVSPListening(IServerPluginCallbacks* vsp_callbacks); + + //////////////////////////////////////// + // Plugin Info + + public: + + virtual const char* GetAuthor(); + virtual const char* GetName(); + virtual const char* GetDescription(); + virtual const char* GetURL(); + virtual const char* GetLicense(); + virtual const char* GetVersion(); + virtual const char* GetDate(); + virtual const char* GetLogTag(); + + //////////////////////////////////////// + // Plugin Globals + + public: + + static IServerGameDLL* GameServer; + static IServerGameClients* GameClients; + static IVEngineServer* EngineServer; + static IServerPluginHelpers* PluginHelpers; + static IGameEventManager2* GameEvents; + static IServerPluginCallbacks* VspCallbacks; + static IPlayerInfoManager* PlayerInfoManager; + static ICvar* CVar; + static CGlobalVars* GlobalVars; + + static [!output PLUGIN_CLASS] Global; + + //////////////////////////////////////// + // Hooks + + private: + + void AddHooks(); + void RemoveHooks(); + +[!if IServerGameDLL_ServerActivate] + DECL_HOOK_SERVER_ACTIVATE; +[!endif] +[!if IServerGameDLL_GameInit] + DECL_HOOK_GAME_INIT; +[!endif] +[!if IServerGameDLL_GameFrame] + DECL_HOOK_GAME_FRAME; +[!endif] +[!if IServerGameDLL_GameShutdown] + DECL_HOOK_GAME_SHUTDOWN; +[!endif] +[!if IServerGameDLL_LevelInit] + DECL_HOOK_LEVEL_INIT; +[!endif] +[!if IServerGameDLL_LevelShutdown] + DECL_HOOK_LEVEL_SHUTDOWN; +[!endif] +[!if IServerGameDLL_GetAllServerClasses] + DECL_HOOK_GET_ALL_SERVER_CLASSES; +[!endif] +[!if IServerGameDLL_GetTickInterval] + DECL_HOOK_GET_TICK_INTERVAL; +[!endif] +[!if IServerGameDLL_GetGameDescription] + DECL_HOOK_GET_GAME_DESC; +[!endif] +[!if IServerGameClients_ClientActive] + DECL_HOOK_CLIENT_ACTIVE; +[!endif] +[!if IServerGameClients_ClientConnect] + DECL_HOOK_CLIENT_CONNECT; +[!endif] +[!if IServerGameClients_ClientDisconnect] + DECL_HOOK_CLIENT_DISCONNECT; +[!endif] +[!if IServerGameClients_ClientCommand] + DECL_HOOK_CLIENT_COMMAND; +[!endif] +[!if IServerGameClients_ClientPutInServer] + DECL_HOOK_CLIENT_PUT_IN_SERVER; +[!endif] +[!if IServerGameClients_ClientSettingsChanged] + DECL_HOOK_CLIENT_SETTINGS_CHANGED; +[!endif] +[!if IServerGameClients_ClientSetupVisibility] + DECL_HOOK_CLIENT_SETUP_VISIBILITY; +[!endif] +[!if IServerGameClients_ClientEarPosition] + DECL_HOOK_CLIENT_EAR_POSITION; +[!endif] +[!if IServerGameClients_PostClientMessagesSent] + DECL_HOOK_POST_CLIENT_MESSAGES_SENT; +[!endif] +[!if IServerGameClients_ProcessUsercmds] + DECL_HOOK_PROCESS_USER_CMDS; +[!endif] +[!if IServerGameClients_NetworkIDValidated] + DECL_HOOK_NETWORK_ID_VALIDATED; +[!endif] +[!if IServerGameClients_GetPlayerLimits] + DECL_HOOK_GET_PLAYER_LIMITS; +[!endif] +[!if IServerGameClients_GetPlayerState] + DECL_HOOK_GET_PLAYER_STATE; +[!endif] +[!if IServerGameClients_GetReplayDelay] + DECL_HOOK_GET_REPLAY_DELAY; +[!endif] +[!if IServerGameClients_GetBugReportInfo] + DECL_HOOK_GET_BUG_REPORT_INFO; +[!endif] +[!if IServerGameClients_SetCommandClient] + DECL_HOOK_SET_COMMAND_CLIENT; +[!endif] + + //////////////////////////////////////// + // Plugin Variables + + protected: + + #if SOURCE_ENGINE == SE_EPISODEONE + SourceHook::CallClass* m_engine_server; + #endif +}; + +///////////////////////////////////////////////////////////////////////// +// Global Vars + +PLUGIN_GLOBALVARS(); + +#endif // _PLUGIN_H