Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
|
b62bf6e859 | ||
|
db6a3bc168 | ||
|
a4cc9a51a3 | ||
|
d5bbdc0fb0 |
154 changed files with 56236 additions and 2955 deletions
BIN
UK-PC-EULA Level Editor.doc
Normal file
BIN
UK-PC-EULA Level Editor.doc
Normal file
Binary file not shown.
|
@ -1,140 +0,0 @@
|
|||
{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial{\*\falt Helvetica};}
|
||||
{\f12\froman\fcharset0\fprq2{\*\panose 00000000000000000000}New York{\*\falt Times New Roman};}{\f27\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Tahoma;}{\f38\fswiss\fcharset0\fprq2{\*\panose 020b0603020202020204}Trebuchet MS;}
|
||||
{\f85\fnil\fcharset77\fprq0{\*\panose 00000000000000000000}Font14579{\*\falt Times New Roman};}{\f86\froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}{\f87\froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}
|
||||
{\f89\froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}{\f90\froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}{\f91\froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}
|
||||
{\f92\froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}{\f93\froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}{\f94\fswiss\fcharset238\fprq2 Arial CE{\*\falt Helvetica};}
|
||||
{\f95\fswiss\fcharset204\fprq2 Arial Cyr{\*\falt Helvetica};}{\f97\fswiss\fcharset161\fprq2 Arial Greek{\*\falt Helvetica};}{\f98\fswiss\fcharset162\fprq2 Arial Tur{\*\falt Helvetica};}{\f99\fswiss\fcharset177\fprq2 Arial (Hebrew){\*\falt Helvetica};}
|
||||
{\f100\fswiss\fcharset178\fprq2 Arial (Arabic){\*\falt Helvetica};}{\f101\fswiss\fcharset186\fprq2 Arial Baltic{\*\falt Helvetica};}{\f302\fswiss\fcharset238\fprq2 Tahoma CE;}{\f303\fswiss\fcharset204\fprq2 Tahoma Cyr;}
|
||||
{\f305\fswiss\fcharset161\fprq2 Tahoma Greek;}{\f306\fswiss\fcharset162\fprq2 Tahoma Tur;}{\f307\fswiss\fcharset177\fprq2 Tahoma (Hebrew);}{\f308\fswiss\fcharset178\fprq2 Tahoma (Arabic);}{\f309\fswiss\fcharset186\fprq2 Tahoma Baltic;}
|
||||
{\f390\fswiss\fcharset238\fprq2 Trebuchet MS CE;}{\f394\fswiss\fcharset162\fprq2 Trebuchet MS Tur;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;
|
||||
\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{
|
||||
\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f27\fs24\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\s1\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
|
||||
\f38\fs48\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 1;}{\s2\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f38\fs36\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
|
||||
\sbasedon0 \snext0 heading 2;}{\s3\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f38\fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 3;}{
|
||||
\s4\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f38\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 4;}{
|
||||
\s5\ql \li0\ri0\sb240\sa60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f38\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 5;}{
|
||||
\s6\ql \li0\ri0\sb240\sa60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f38\fs16\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 6;}{\*\cs10 \additive Default Paragraph Font;}{\*\cs15 \additive \ul\cf0
|
||||
\sbasedon10 Hyperlink;}{\*\cs16 \additive \ul\cf0 \sbasedon10 FollowedHyperlink;}{\s17\ql \li0\ri0\sb60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext17 Body;}
|
||||
{\s18\ql \li0\ri0\sl480\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \caps\f85\fs54\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext18 Heading;}{
|
||||
\s19\ql \fi-145\li288\ri0\sb60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin288\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 Bullet;}{\s20\ql \li0\ri0\widctlpar\nooverflow\faauto\rin0\lin0\itap0
|
||||
\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 \sbasedon0 \snext20 Body Text;}}{\info{\title SOFTWARE LICENSE AGREEMENT}{\author Belinda M. Van Sickle}{\operator Rick Johnson}{\creatim\yr2002\mo5\dy9\hr14\min50}{\revtim\yr2002\mo5\dy9\hr14\min50}
|
||||
{\printim\yr1999\mo8\dy13\hr8\min44}{\version2}{\edmins0}{\nofpages1}{\nofwords1706}{\nofchars9725}{\*\company Ignited Minds, LLC}{\nofcharsws11942}{\vern8247}}{\*\userprops {\propname Microsoft Theme}\proptype30{\staticval klingon-industrial 111}}
|
||||
\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dghspace180\dgvspace180\dghorigin1701\dgvorigin1984\dghshow0\dgvshow0\jexpand\viewkind4\viewscale100\pgbrdrhead\pgbrdrfoot\htmautsp\nolnhtadjtbl\lnbrkrule
|
||||
\fet0{\*\background {\shp{\*\shpinst\shpleft0\shptop0\shpright0\shpbottom0\shpfhdr0\shpbxmargin\shpbxignore\shpbymargin\shpbyignore\shpwr0\shpwrk0\shpfblwtxt1\shpz0\shplid1025{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
|
||||
{\sp{\sn fillType}{\sv 3}}{\sp{\sn fillBlipName}{\sv indtextb}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn bWMode}{\sv 9}}{\sp{\sn fBackground}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}}}}\sectd
|
||||
\linex0\endnhere\pgbrdropt32\sectlinegrid360\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4
|
||||
\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}
|
||||
{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s18\ql \li0\ri0\sl-480\slmult0
|
||||
\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \caps\f85\fs54\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f1\fs20 SOFTWARE LICENSE AGREEMENT
|
||||
\par }\pard\plain \s17\ql \li0\ri0\sb29\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20 IMPORTANT - READ CAREFULLY: YOUR USE OF THIS SOFTWARE (THE \'93PROGRAM\'94
|
||||
) IS SUBJECT TO THE SOFTWARE LICENSE TERMS SET FORTH BELOW. THE \'93PROGRAM\'94 INCLUDES ALL SOFTWARE INCLUDED WITH THIS AGREEMENT, THE ASSOCIATED MEDIA, ANY PRINTED M
|
||||
ATERIALS, AND ANY ON-LINE OR ELECTRONIC DOCUMENTATION, AND ANY AND ALL COPIES OF SUCH SOFTWARE AND MATERIALS. BY OPENING THIS PACKAGE, INSTALLING, AND/OR USING THE PROGRAM AND ANY SOFTWARE PROGRAMS INCLUDED WITHIN THE PROGRAM, YOU ACCEPT THE TERMS OF THIS
|
||||
LICENSE WITH ACTIVISION, INC. (\'93ACTIVISION\'94).
|
||||
\par
|
||||
\par LIMITED USE LICENSE: Subject to the conditions described below, Activision grants you the non-exclusive, non-transferable, limited right and license to install and use one copy of the Program solely and exclu
|
||||
sively for your personal use. All rights not specifically granted under this Agreement are reserved by Activision and, as applicable, Activision\rquote
|
||||
s licensors. The Program is licensed, not sold, for your use. Your license confers no title or ownership in the
|
||||
Program and should not be construed as a sale of any rights in the Program. All rights not specifically granted under this Agreement are reserved by Activision and, as applicable, its licensors.
|
||||
\par
|
||||
\par LICENSE CONDITIONS
|
||||
\par You agree not to:
|
||||
\par }\pard\plain \s19\ql \fi-113\li119\ri0\sb29\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin119\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20 \bullet \tab Exploit the Program
|
||||
or any of its parts commercially, including but not limited to use at a cyber cafe, computer gaming center or any other location-based site. Activision may offer a separate Site License Agreement to permit you to make the Program available for commercial
|
||||
use; see the contact information below.
|
||||
\par \bullet \tab Sell, rent, lease, license, distribute or otherwise transfer this Program, or any copies of this Program, without the express prior written consent of Activision.
|
||||
\par \bullet \tab Use the Program, or permit use of the Program, in a network, multi-user arrangement or remote access arrangement, including any on-line use, except as otherwise specifically provided by the Program.
|
||||
\par \bullet \tab Use the Program, or permit use of the Program, on more than one computer, computer terminal, or workstation at the same time.
|
||||
\par \bullet \tab Make copies of the Program or any part thereof, except for back up or archival purposes, or make copies of the materials accompanying the Program.
|
||||
\par \bullet \tab Copy the Program onto a hard drive or other storage device; you must run the Program
|
||||
from the included CD-ROM (although the Program itself may automatically copy a portion of the Program onto your hard drive during installation in order to run more efficiently).
|
||||
\par \bullet \tab Reverse engineer, derive source code, modify, decompile, or disassemble the Program, in whole or in part.
|
||||
\par \bullet \tab Remove, disable or circumvent any proprietary notices or labels contained on or within the Program.
|
||||
\par \bullet \tab Export or re-export the Program or any copy or adaptation thereof in violation of any applicable laws or regulations.
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f27\fs24\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||
\par }\pard\plain \s17\ql \li0\ri0\sb29\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20 OW
|
||||
NERSHIP: All title, ownership rights and intellectual property rights in and to the Program and any and all copies thereof are owned by Activision or its licensors. The Program is protected by the copyright laws of the United States, international copyrig
|
||||
ht treaties and conventions and other laws. The Program contains certain licensed materials and Activision\rquote
|
||||
s licensors may protect their rights in the event of any violation of this Agreement. You agree not to remove, disable or circumvent any proprietary notices or labels contained on or within the Program.
|
||||
\par
|
||||
\par THE PROGRAM UTILITIES: The Program contains certain design, programming and processing utilities, tools, assets and other resources (\'93the Program Utilities\'94) for use with the Program that allow you to c
|
||||
reate customized new game levels and other related game materials for personal use in connection with the Program (\'93New Game Materials\'94). The use of the Program Utilities is subject to the following additional license restrictions:
|
||||
\par }\pard\plain \s19\ql \fi-108\li119\ri0\sb29\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin119\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20 \bullet \tab You agree that, as a c
|
||||
ondition to your using the Program Utilities, you will not use or allow third parties to use the Program Utilities and the New Game Materials created by you for any commercial purposes, including but not limited to selling, renting, leasing, licensing, di
|
||||
s
|
||||
tributing, or otherwise transferring the ownership of such New Game Materials, whether on a stand alone basis or packaged in combination with the New Game Materials created by others, through any and all distribution channels, including, without limitatio
|
||||
n
|
||||
, retail sales and on-line electronic distribution. You agree not to solicit, initiate or encourage any proposal or offer from any person or entity to create any New Game Materials for commercial distribution. You agree to promptly inform Activision in wr
|
||||
iting of any instances of your receipt of any such proposal or offer.
|
||||
\par \bullet \tab If you decide to make available the use of the New Game Materials created by you to other gamers, you agree to do so solely without charge.
|
||||
\par \bullet \tab New Game Materials shall not contain modifications to any COM, EXE or DLL files or to any other executable Product files.
|
||||
\par \bullet \tab New Game Materials may be created only if such New Game Materials can be used exclusively in combination with the retail version of the Program. New Game Materials may not be designed to be used as a stand-alone product.
|
||||
\par \bullet \tab New Game Materials must not contain any illegal, obscene or defamatory materials, materials that infringe rights of privacy and publicity of third parties or (without appropriate irrevocable licenses granted
|
||||
specifically for that purpose) any trademarks, copyright-protected works or other properties of third parties.
|
||||
\par \bullet \tab All New Game Materials must contain prominent identification at least in any on-line description and with reasonable duration on the opening screen: (a) the name and E-mail address of the New Game Materials\rquote
|
||||
creator(s) and (b) the words \'93THIS MATERIAL IS NOT MADE OR SUPPORTED BY ACTIVISION.\'94
|
||||
\par }\pard\plain \s17\ql \li0\ri0\sb29\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20
|
||||
\par LIMITED WARRANTY: Activision warrants to the original consumer purchaser of the Program that the record
|
||||
ing medium on which the Program is recorded will be free from defects in material and workmanship for 90 days from the date of purchase. If the recording medium is found defective within 90 days of original purchase, Activision agrees to replace, free of
|
||||
c
|
||||
harge, any product discovered to be defective within such period upon its receipt of the Product, postage paid, with proof of the date of purchase, as long as the Program is still being manufactured by Activision. In the event that the Program is no longe
|
||||
r
|
||||
available, Activision retains the right to substitute a similar program of equal or greater value. This warranty is limited to the recording medium containing the Program as originally provided by Activision and is not applicable to normal wear and tear.
|
||||
This warranty shall not be applicable and shall be void if the defect has arisen through abuse, mistreatment, or neglect. Any implied warranties prescribed by statute are expressly limited to the 90-day period described above.}{\f1\fs20
|
||||
\par }{\f1\fs20 EXCEPT AS SET FORTH ABOVE, TH
|
||||
IS WARRANTY IS IN LIEU OF ALL OTHER WARRANTIES, WHETHER ORAL OR WRITTEN, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, AND NO OTHER REPRESENTATIONS OR CLAIMS OF ANY KIND SHALL BE BINDI
|
||||
NG ON OR OBLIGATE ACTIVISION.
|
||||
\par When returning the Program for warranty replacement please send the original product disks only in protective packaging and include: (1) a photocopy of your dated sales receipt; (2) your name and return address typed or clearl
|
||||
y printed; (3) a brief note describing the defect, the problem(s) you are encountered and the system on which you are running the Program; (4) if you are returning the Program after the 90-day warranty period, but within one year after the date of purchas
|
||||
e, please include check or money order for $10 U.S. (A$19 for Australia, or \'a310.00 for Europe) currency per CD or floppy disk replacement. Note: Certified mail recommended.
|
||||
\par In the U.S. send to:
|
||||
\par
|
||||
\par Warranty Replacements
|
||||
\par Activision, Inc.
|
||||
\par P.O. Box 67713
|
||||
\par Los Angeles, California 90067
|
||||
\par
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f27\fs24\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f1\fs20 In Europe send to:
|
||||
\par }{\f1\fs20
|
||||
\par WARRANTY REPLACEMENTS
|
||||
\par }\pard\plain \s20\ql \li0\ri0\widctlpar\nooverflow\faauto\rin0\lin0\itap0 \fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f1\fs20\lang1033\langfe1033\langnp1033
|
||||
ACTIVISION (UK) Ltd., Parliament House, St Laurence Way, Slough, Berkshire, SL1 2BW, United Kingdom.
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f27\fs24\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20 Disc Replacement: +44 (0)}{\f1\fs20\cf6 }{\f1\fs20 8705 143 525
|
||||
\par
|
||||
\par }{\b\f1\fs20 In Australia send to:
|
||||
\par }{\f1\fs20
|
||||
\par Warranty Replacements
|
||||
\par Activision
|
||||
\par }\pard \ql \li0\ri0\widctlpar\nooverflow\faauto\rin0\lin0\itap0 {\f1\fs20 Century Plaza}{\f1\fs20\cf0
|
||||
\par }{\f1\fs20 41 Rawson Street}{\f1\fs20
|
||||
\par }{\f1\fs20 Epping, NSW 2121}{\f1\fs20
|
||||
\par }{\f1\fs20 Australia
|
||||
\par }\pard\plain \s17\ql \li0\ri0\sb29\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20
|
||||
\par LIMITATION ON DAMAGES: IN NO EVENT WILL ACTIVISION BE LIABLE FOR SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES RESULTING FROM POSSESSION, USE OR MALFUNCTION OF THE PROGRAM, INCLUDING DAMAGES T
|
||||
O PROPERTY, LOSS OF GOODWILL, COMPUTER FAILURE OR MALFUNCTION AND, TO THE EXTENT PERMITTED BY LAW, DAMAGES FOR PERSONAL INJURIES, EVEN IF ACTIVISION HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ACTIVISION\rquote
|
||||
S LIABILITY SHALL NOT EXCEED THE ACTUAL PRI
|
||||
CE PAID FOR THE LICENSE TO USE THIS PROGRAM. SOME STATES/COUNTRIES DO NOT ALLOW LIMITATIONS ON HOW LONG AN IMPLIED WARRANTY LASTS AND/OR THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATIONS AND/OR EXCLUSION OR LIMIT
|
||||
ATION OF LIABILITY MAY NOT APPLY TO YOU. THIS WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS, AND YOU MAY HAVE OTHER RIGHTS WHICH VARY FROM JURISDICTION TO JURISDICTION.
|
||||
\par TERMINATION: Without prejudice to any other rights of Activision, this Agreement will terminate automatically if you fail to comply with its terms and conditions. In such event, you must destroy all copies of the Program and all of its component parts.
|
||||
|
||||
\par
|
||||
\par U.S. GOVERNMENT RESTRICTED RIGHTS: the Program and documentation have been developed entirely at private expense and are provided as \'93Commercial Computer Software\'94 or \'93restricted computer software.\'94
|
||||
Use, duplication or disclosure by the U.S. Government or a U.S. Government subcontractor is subject to the restrictions set forth in subparagraph (c)(1)
|
||||
(ii) of the Rights in Technical Data and Computer Software clauses in DFARS 252.227-7013 or as set forth in subparagraph (c)(1) and (2) of the Commercial Computer Software Restricted Rights clauses at FAR 52.227-19, as applicable. The Contractor/Manufactu
|
||||
rer is Activision, Inc., 3100 Ocean Park Boulevard, Santa Monica, California 90405.
|
||||
\par
|
||||
\par INJUNCTION: Because Activision would be irreparably damaged if the terms of this Agreement were not specifically enforced, you agree that Activision shall be entitled, with
|
||||
out bond, other security or proof of damages, to appropriate equitable remedies with respect to breaches of this Agreement, in addition to such other remedies as Activision may otherwise have under applicable laws.
|
||||
\par
|
||||
\par INDEMNITY: You agree to indemnify, defen
|
||||
d and hold Activision, its partners, licensors, affiliates, contractors, officers, directors, employees and agents harmless from all damages, losses and expenses arising directly or indirectly from your acts and omissions to act in using the Product pursu
|
||||
ant to the terms of this Agreement
|
||||
\par
|
||||
\par MISCELLANEOUS: This Agreement represents the complete agreement concerning this license between the parties and supersedes all prior agreements and representations between them. It may be amended only by a writing execut
|
||||
ed by both parties. If any provision of this Agreement is held to be unenforceable for any reason, such provision shall be reformed only to the extent necessary to make it enforceable and the remaining provisions of this Agreement shall not be affected. T
|
||||
h
|
||||
is Agreement shall be construed under California law as such law is applied to agreements between California residents entered into and to be performed within California, except as governed by federal law and you consent to the exclusive jurisdiction of t
|
||||
he state and federal courts in Los Angeles, California.
|
||||
\par
|
||||
\par If you have any questions concerning this license, you may contact Activision at 3100 Ocean Park Boulevard, Santa Monica, California 90405, USA, (310) 255-2000, Attn. Business and Legal Affairs, legal@activision.com.
|
||||
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f27\fs24\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20
|
||||
\par }}
|
3768
base/maps/heli.map
Normal file
3768
base/maps/heli.map
Normal file
File diff suppressed because it is too large
Load diff
45507
base/maps/kam6.map
Normal file
45507
base/maps/kam6.map
Normal file
File diff suppressed because it is too large
Load diff
48
base/scripts/kam6/ambush_one.txt
Normal file
48
base/scripts/kam6/ambush_one.txt
Normal file
|
@ -0,0 +1,48 @@
|
|||
//Generated by BehavEd
|
||||
|
||||
rem ( "ambush once the player crashes train, guards shoot out windows on train" );
|
||||
rem ( "sarge takes out first window" );
|
||||
|
||||
affect ( "ambush_one_sarge", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
set ( /*@SET_TYPES*/ "SET_RELEASE_ONCONTACT", /*@BOOL_TYPES_REL*/ "ON" );
|
||||
set ( /*@SET_TYPES*/ "SET_FACE_TARGET", "window_one_shoot" );
|
||||
set ( /*@SET_TYPES*/ "SET_ENEMY", "window_one_shoot" );
|
||||
set ( /*@SET_TYPES*/ "SET_TASK", /*@TASK_TYPES*/ "Attack" );
|
||||
wait ( 700.000 );
|
||||
set ( /*@SET_TYPES*/ "SET_ENEMY", "NULL" );
|
||||
}
|
||||
|
||||
|
||||
affect ( "ambush_one_guy1", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
set ( /*@SET_TYPES*/ "SET_RELEASE_ONCONTACT", /*@BOOL_TYPES_REL*/ "ON" );
|
||||
set ( /*@SET_TYPES*/ "SET_FACE_TARGET", "window_two_shoot" );
|
||||
set ( /*@SET_TYPES*/ "SET_ENEMY", "window_two_shoot" );
|
||||
set ( /*@SET_TYPES*/ "SET_TASK", /*@TASK_TYPES*/ "Attack" );
|
||||
wait ( 700.000 );
|
||||
set ( /*@SET_TYPES*/ "SET_ENEMY", "NULL" );
|
||||
}
|
||||
|
||||
|
||||
affect ( "ambush_one_guy2", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
set ( /*@SET_TYPES*/ "SET_RELEASE_ONCONTACT", /*@BOOL_TYPES_REL*/ "ON" );
|
||||
set ( /*@SET_TYPES*/ "SET_FACE_TARGET", "window_three_shoot" );
|
||||
set ( /*@SET_TYPES*/ "SET_ENEMY", "window_three_shoot" );
|
||||
set ( /*@SET_TYPES*/ "SET_TASK", /*@TASK_TYPES*/ "Attack" );
|
||||
wait ( 700.000 );
|
||||
set ( /*@SET_TYPES*/ "SET_ENEMY", "NULL" );
|
||||
}
|
||||
|
||||
|
||||
affect ( "ambush_one_guy3", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
set ( /*@SET_TYPES*/ "SET_RELEASE_ONCONTACT", /*@BOOL_TYPES_REL*/ "ON" );
|
||||
set ( /*@SET_TYPES*/ "SET_FACE_TARGET", "window_four_shoot" );
|
||||
set ( /*@SET_TYPES*/ "SET_ENEMY", "window_four_shoot" );
|
||||
set ( /*@SET_TYPES*/ "SET_TASK", /*@TASK_TYPES*/ "Attack" );
|
||||
wait ( 700.000 );
|
||||
set ( /*@SET_TYPES*/ "SET_ENEMY", "NULL" );
|
||||
}
|
||||
|
9
base/scripts/kam6/ceiling_cart.txt
Normal file
9
base/scripts/kam6/ceiling_cart.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
//Generated by BehavEd
|
||||
|
||||
rem ( "this is the roff of the ceiling cart going by during the beginning" );
|
||||
|
||||
affect ( "ceiling_cart", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
play ( /*@PLAY_TYPES*/ "PLAY_ROFF", "scripts/kam6/roffs/cart/car_thing_cart.rof" );
|
||||
}
|
||||
|
10
base/scripts/kam6/door_ambush.txt
Normal file
10
base/scripts/kam6/door_ambush.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
//Generated by BehavEd
|
||||
|
||||
rem ( "when the player is on the second tier the front door opens and guys ambush" );
|
||||
|
||||
affect ( "player", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
use ( "front_door" );
|
||||
use ( "main_door_guys" );
|
||||
}
|
||||
|
72
base/scripts/kam6/el_down.txt
Normal file
72
base/scripts/kam6/el_down.txt
Normal file
|
@ -0,0 +1,72 @@
|
|||
//Generated by BehavEd
|
||||
|
||||
rem ( "opens elevator doors and lowers the elevator" );
|
||||
|
||||
affect ( "door_left1", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "second half of left door moving out and down" );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "24.0 0.0 0.0 500.0" );
|
||||
wait ( 500.000 );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 -1760.0 19000.0" );
|
||||
wait ( 19000.000 );
|
||||
//$"moveBy"@1
|
||||
set ( "SET_MOVE_BY", "-24.0 0.0 0.0 1000.0" );
|
||||
}
|
||||
|
||||
|
||||
affect ( "door_left2", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "left2 moving out and down" );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "56.0 0.0 0.0 500.0" );
|
||||
wait ( 500.000 );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 -1760.0 19000.0" );
|
||||
wait ( 19000.000 );
|
||||
//$"moveBy"@1
|
||||
set ( "SET_MOVE_BY", "-56.0 0.0 0.0 1000.0" );
|
||||
}
|
||||
|
||||
|
||||
affect ( "door_right1", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "second half of right door moving out and down" );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "-24.0 0.0 0.0 500.0" );
|
||||
wait ( 500.000 );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 -1760.0 19000.0" );
|
||||
wait ( 19000.000 );
|
||||
//$"moveBy"@1
|
||||
set ( "SET_MOVE_BY", "24.0 0.0 0.0 1000.0" );
|
||||
}
|
||||
|
||||
|
||||
affect ( "door_right2", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "right2 moving out and down" );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "-56.0 0.0 0.0 500.0" );
|
||||
wait ( 500.000 );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 -1760.0 19000.0" );
|
||||
wait ( 19000.000 );
|
||||
//$"moveBy"@1
|
||||
set ( "SET_MOVE_BY", "56.0 0.0 0.0 1000.0" );
|
||||
}
|
||||
|
||||
|
||||
affect ( "elevator", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "elevator, below is a func wall to block the player from leaving" );
|
||||
use ( "dont_leave_elev" );
|
||||
sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/misc/events/elevator_run.mp3" );
|
||||
//$"moveBy"@4
|
||||
wait ( 500.000 );
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 -1760.0 19000.0" );
|
||||
wait ( 19000.000 );
|
||||
use ( "dont_leave_elev" );
|
||||
}
|
||||
|
69
base/scripts/kam6/el_downb.txt
Normal file
69
base/scripts/kam6/el_downb.txt
Normal file
|
@ -0,0 +1,69 @@
|
|||
//Generated by BehavEd
|
||||
|
||||
rem ( "opens elevator doors and lowers the elevator" );
|
||||
|
||||
affect ( "door_left2", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "left2 moving out and down" );
|
||||
//$"moveBy"@4
|
||||
set ( "SET_MOVE_BY", "56.0 0.0 0.0 1000.0" );
|
||||
wait ( 1000.000 );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 -1760.0 19000.0" );
|
||||
wait ( 19000.000 );
|
||||
//$"moveBy"@1
|
||||
set ( "SET_MOVE_BY", "-56.0 0.0 0.0 1000.0" );
|
||||
|
||||
affect ( "door_left1", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "second half of left door moving out and down" );
|
||||
//$"moveBy"@4
|
||||
set ( "SET_MOVE_BY", "24.0 0.0 0.0 1000.0" );
|
||||
wait ( 1000.000 );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 -1760.0 19000.0" );
|
||||
wait ( 19000.000 );
|
||||
//$"moveBy"@1
|
||||
set ( "SET_MOVE_BY", "-24.0 0.0 0.0 1000.0" );
|
||||
|
||||
affect ( "door_right2", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "right2 moving out and down" );
|
||||
//$"moveBy"@4
|
||||
set ( "SET_MOVE_BY", "-56.0 0.0 0.0 1000.0" );
|
||||
wait ( 1000.000 );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 -1760.0 19000.0" );
|
||||
wait ( 19000.000 );
|
||||
//$"moveBy"@1
|
||||
set ( "SET_MOVE_BY", "56.0 0.0 0.0 1000.0" );
|
||||
|
||||
affect ( "door_right1", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "second half of right door moving out and down" );
|
||||
//$"moveBy"@4
|
||||
set ( "SET_MOVE_BY", "-24.0 0.0 0.0 1000.0" );
|
||||
wait ( 1000.000 );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 -1760.0 19000.0" );
|
||||
wait ( 19000.000 );
|
||||
//$"moveBy"@1
|
||||
set ( "SET_MOVE_BY", "24.0 0.0 0.0 1000.0" );
|
||||
|
||||
affect ( "elevator", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "elevator moving" );
|
||||
sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/misc/events/elevator_run.mp3" );
|
||||
//$"moveBy"@2
|
||||
wait ( 1000.000 );
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 -1760.0 19000.0" );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
73
base/scripts/kam6/el_up.txt
Normal file
73
base/scripts/kam6/el_up.txt
Normal file
|
@ -0,0 +1,73 @@
|
|||
//Generated by BehavEd
|
||||
|
||||
rem ( "opens elevator doors and lowers the elevator" );
|
||||
|
||||
affect ( "door_left1", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "second part opening and moving down" );
|
||||
sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/misc/events/elevator_run.mp3" );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "24.0 0.0 0.0 500.0" );
|
||||
wait ( 500.000 );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 1760.0 18000.0" );
|
||||
wait ( 18000.000 );
|
||||
//$"moveBy"@1
|
||||
set ( "SET_MOVE_BY", "-24.0 0.0 0.0 1000.0" );
|
||||
}
|
||||
|
||||
|
||||
affect ( "door_left2", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "left one opening and moving down" );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "56.0 0.0 0.0 500.0" );
|
||||
wait ( 500.000 );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 1760.0 18000.0" );
|
||||
wait ( 18000.000 );
|
||||
//$"moveBy"@1
|
||||
set ( "SET_MOVE_BY", "-56.0 0.0 0.0 1000.0" );
|
||||
}
|
||||
|
||||
|
||||
affect ( "door_right1", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "second right one opening and moving down" );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "-24.0 0.0 0.0 500.0" );
|
||||
wait ( 500.000 );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 1760.0 18000.0" );
|
||||
wait ( 18000.000 );
|
||||
//$"moveBy"@1
|
||||
set ( "SET_MOVE_BY", "24.0 0.0 0.0 1000.0" );
|
||||
}
|
||||
|
||||
|
||||
affect ( "door_right2", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "right one opening and moving down" );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "-56.0 0.0 0.0 500.0" );
|
||||
wait ( 500.000 );
|
||||
//$"moveBy"@3
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 1760.0 18000.0" );
|
||||
wait ( 18000.000 );
|
||||
//$"moveBy"@1
|
||||
set ( "SET_MOVE_BY", "56.0 0.0 0.0 1000.0" );
|
||||
}
|
||||
|
||||
|
||||
affect ( "elevator", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
rem ( "actual elevator moving down" );
|
||||
use ( "el_sound" );
|
||||
use ( "dont_leave_elev" );
|
||||
//$"moveBy"@4
|
||||
wait ( 500.000 );
|
||||
set ( "SET_MOVE_BY", "0.0 0.0 1760.0 18000.0" );
|
||||
wait ( 18000.000 );
|
||||
use ( "dont_leave_elev" );
|
||||
}
|
||||
|
29
base/scripts/kam6/elev_see_player.txt
Normal file
29
base/scripts/kam6/elev_see_player.txt
Normal file
|
@ -0,0 +1,29 @@
|
|||
//Generated by BehavEd
|
||||
|
||||
rem ( "two guys runing out of view when they see the player" );
|
||||
|
||||
affect ( "elev_sci_guy", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
|
||||
task ( "sci guy run" )
|
||||
{
|
||||
set ( /*@SET_TYPES*/ "SET_TASK", /*@TASK_TYPES*/ "MoveToEnt" );
|
||||
set ( /*@SET_TYPES*/ "SET_ENTGOAL", "elev_sci_guy_spot" );
|
||||
}
|
||||
|
||||
dowait ( "sci guy run" );
|
||||
}
|
||||
|
||||
|
||||
affect ( "elev_sci_guy", /*@AFFECT_TYPE*/ FLUSH )
|
||||
{
|
||||
|
||||
task ( "chem guy run" )
|
||||
{
|
||||
set ( /*@SET_TYPES*/ "SET_TASK", /*@TASK_TYPES*/ "MoveToEnt" );
|
||||
set ( /*@SET_TYPES*/ "SET_ENTGOAL", "chem_sci_guy_spot" );
|
||||
}
|
||||
|
||||
dowait ( "chem guy run" );
|
||||
}
|
||||
|
BIN
bin/AnimatEd.exe
Normal file
BIN
bin/AnimatEd.exe
Normal file
Binary file not shown.
536
bin/BehavEd.bhc
Normal file
536
bin/BehavEd.bhc
Normal file
|
@ -0,0 +1,536 @@
|
|||
/*
|
||||
BehavEd Command List
|
||||
|
||||
(Note that anything involving floats must be (eg) "1.0", not just "1")
|
||||
*/
|
||||
//=== TYPES ================================================================
|
||||
//header file type includes
|
||||
|
||||
// SOF2SPECIFIC: this typeset now MUST be present for BehavEd to present GET-helper combos!
|
||||
<%s="SET_TYPES">
|
||||
{
|
||||
#include "IGInterface.h" setType_e
|
||||
}
|
||||
|
||||
<%s="BOOL_TYPES">
|
||||
{
|
||||
"OFF"
|
||||
"ON"
|
||||
}
|
||||
|
||||
<%s="BOOL_TYPES_REL">
|
||||
{
|
||||
"OFF"
|
||||
"ON"
|
||||
"NULL"
|
||||
}
|
||||
|
||||
<%s="GOAL_REL">
|
||||
{
|
||||
"STOP"
|
||||
"PAUSE"
|
||||
"GO"
|
||||
}
|
||||
|
||||
<%s="LOOK_TYPES">
|
||||
{
|
||||
"HEAD"
|
||||
"EYES"
|
||||
"FULL"
|
||||
"NULL"
|
||||
}
|
||||
|
||||
<%s="HITLOC">
|
||||
{
|
||||
"Head"
|
||||
"Right Leg"
|
||||
"Neck"
|
||||
"Left Leg"
|
||||
"Chest"
|
||||
"Right Foot"
|
||||
"Left Shoulder"
|
||||
"Left Arm"
|
||||
"Left Hand"
|
||||
"Right Shoulder"
|
||||
"Right Arm"
|
||||
"Right Hand"
|
||||
"Gut"
|
||||
"Groin"
|
||||
"Left Thigh"
|
||||
"Left Foot"
|
||||
"Right Thigh"
|
||||
"NULL"
|
||||
}
|
||||
|
||||
<%s="SPEED">
|
||||
{
|
||||
"1 - None"
|
||||
"2 - Slow"
|
||||
"3 - TakeYourTime"
|
||||
"4 - Jog"
|
||||
"5 - NoRush"
|
||||
"6 - FastJog"
|
||||
"7 - HurryUp"
|
||||
"8 - Run"
|
||||
"9 - FastRun"
|
||||
"10 - Emergency"
|
||||
}
|
||||
|
||||
|
||||
<%s="TASK_TYPES">
|
||||
{
|
||||
"WALK"//# uses finite state for walking
|
||||
"RUN"//# uses finite state for running
|
||||
"Path"//# plans path to navpoint using Lich
|
||||
"PathCrouch"//# plans path to navpoint using Lich, once there- goes to crouch spot
|
||||
"Move"//# moves to a specific point on map (NOT finite state driven)
|
||||
"MoveToEnt"//# moves to a specific entity on map
|
||||
"MoveToDeadEnt"//# movesto dead entity without stepping on it (do NOT use me if your name is not FOWLOR)
|
||||
"Teleport"//# teleports to point (NOT finite state driven)
|
||||
"Attack"//# fires weapon (might need to set Focus first)
|
||||
"Focus"//# focus on target (use SET_ENEMY to specify one, default is closest member of enemy team)
|
||||
"Use"//# Walk to this entity, then use it (use entgoal for name of entity)
|
||||
"Pickup"//# Walk to the closest pickup, and pick it up
|
||||
"Inventory"//# For inventory actions
|
||||
}
|
||||
|
||||
<%s="GOAL_TYPES">
|
||||
{
|
||||
"HoldArea"//# SQUAD: Move to this area using leapfrog and hold it (use areagoal)
|
||||
"FastAdvance"//# SQUAD: Move to this area quickly and hold it (use areagoal)_
|
||||
"Surround"//# SQUAD: Surround this opponent (use entgoal)
|
||||
"TakePosition"//# FIRETEAM/INDIVIDUAL: leap frog to this position (use vecgoal)
|
||||
"Recon"// # FIRETEAM/INDIVIDUAL: Proceed to this area then recon/explore it (use areagoal)
|
||||
"Guard"// # FIRETEAM/INDIVIDUAL: Patrol in this area (use areagoal)
|
||||
"Wander"// # FIRETEAM/INDIVIDUAL: Wander this area (use areagoal)
|
||||
"Follow"// # FIRETEAM/INDIVIDUAL: Follow this entity (use entgoal)
|
||||
}
|
||||
|
||||
<%s="GOAL_MODES">
|
||||
{
|
||||
"Stealth"//# Execute your teams goals all stealth-like (send out scouts first)
|
||||
"Rambo"//# Disregard stealth
|
||||
"Flank"//# Send 1/2 of the team to flank area. (use areagoal2)
|
||||
}
|
||||
|
||||
<%s="INVENTORY_ACTION">
|
||||
{
|
||||
"Draw"
|
||||
"Hold" //# Will also draw if not currently drawn, then hold
|
||||
"Examine" //# Will also draw if not currently drawn, then examine
|
||||
"Use"//# Will also draw if not currently drawn, then use
|
||||
"Throw"//# Will also draw if not currently drawn, then throw
|
||||
"Holster"
|
||||
"Toss"//# Only for gun, tosses it out
|
||||
}
|
||||
|
||||
<%i="DECLARE_TYPE">
|
||||
{
|
||||
FLOAT//## %s="" # A number
|
||||
STRING//## %s="" # A string
|
||||
VECTOR//## %s="" # A vector
|
||||
}
|
||||
|
||||
<%i="CHANNELS">
|
||||
{
|
||||
#include "channels.h" soundChannel_e
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
<%s="SKEL">
|
||||
{
|
||||
"Arms" // # set animation arms
|
||||
"Torso" // # set animation torso
|
||||
"Body" // # set animation body
|
||||
"Left Arm" // # set animation left arm
|
||||
"Eyes" // # set eye animations
|
||||
|
||||
}
|
||||
|
||||
<%s="PRIM">
|
||||
{
|
||||
"Attack" // # use Attack primitive
|
||||
"Damage" // # use Damage primitive
|
||||
"HMove" // # use HMOVE primitive
|
||||
"VMove" // # use VMOVE primitive
|
||||
"Stationary" // # use Stationary primitive
|
||||
"Inventory" // # use Inventory primitive
|
||||
"Interaction" // # use Interaction primitive
|
||||
"Communication" // # use Communication primitive
|
||||
}
|
||||
|
||||
<%s="HEALTH">
|
||||
{
|
||||
"Dead" // # use Dead Animations
|
||||
"Low" // # use Low HP Animations
|
||||
"Medium" // # use Med HP Animations
|
||||
"Full" // # use Full HP Animations
|
||||
}
|
||||
<%s="MOOD">
|
||||
{
|
||||
"Bored"
|
||||
"Happy"
|
||||
"Sad"
|
||||
"Alert"
|
||||
"Afraid"
|
||||
"Stealth"
|
||||
"Soldier"
|
||||
"Normal"
|
||||
"AfraidFace"
|
||||
"NULL"
|
||||
}
|
||||
<%s="ITEM">
|
||||
{
|
||||
"Hold Rifle"
|
||||
"None" // # not holding anything
|
||||
"Hold Pistol"
|
||||
}
|
||||
<%s="STANCE">
|
||||
{
|
||||
"Stand"
|
||||
"Crouch"
|
||||
"Prone"
|
||||
"Sit"
|
||||
"Jump"
|
||||
"Swim"
|
||||
"NULL"
|
||||
}
|
||||
<%s="HANDSIGNAL">
|
||||
{
|
||||
"Advance"
|
||||
"Danger"
|
||||
"Disperse"
|
||||
"Follow"
|
||||
"Halt"
|
||||
"Point"
|
||||
"Rush"
|
||||
"Sight"
|
||||
"Slow"
|
||||
"Terrorist Point"
|
||||
}
|
||||
<%s="TEAM_TYPES">
|
||||
{
|
||||
"Team_None"
|
||||
"Team_TheShop"
|
||||
"Team_Prometheus"
|
||||
"Team_ColombianRebels"
|
||||
"Team_Finca"
|
||||
"Team_Czech"
|
||||
"Team_HongKongGang"
|
||||
}
|
||||
<%s="ANIMNAME">
|
||||
{
|
||||
"Fire M4" // # name of Animation to use
|
||||
"Breathe"
|
||||
"Jog"
|
||||
"Jog Back"
|
||||
"Run"
|
||||
"Run Back"
|
||||
"Walk"
|
||||
"Swim"
|
||||
"Walk Back"
|
||||
"Walk030"
|
||||
"Walk060"
|
||||
"Walk090"
|
||||
"Walk150"
|
||||
"Walk210"
|
||||
"Walk240"
|
||||
"Walk270"
|
||||
"Walk300"
|
||||
"Walk330"
|
||||
"Crouch Fast Walk"
|
||||
"Crouch Run"
|
||||
"Crouch Slow Walk"
|
||||
"Crouch Walk"
|
||||
"Crouch Walk Back"
|
||||
"Advance"
|
||||
"Danger"
|
||||
"Disperse"
|
||||
"Follow"
|
||||
"Halt"
|
||||
"Point"
|
||||
"Rush"
|
||||
"Sight"
|
||||
"Slow"
|
||||
"Heli Piloting"
|
||||
"Heli Turning"
|
||||
"Fire"
|
||||
"ShootM60"
|
||||
"Hold"
|
||||
"Hold Death"
|
||||
"Neck Death"
|
||||
"Pain"
|
||||
"Left Leg Death"
|
||||
"Left Shoulder Death"
|
||||
"R Shoulder"
|
||||
"Right Thigh Death"
|
||||
"Left Thigh Death"
|
||||
"Groin Death"
|
||||
"Foot Death"
|
||||
"Front Death"
|
||||
"HeadPain"
|
||||
"Front Pain"
|
||||
}
|
||||
|
||||
<%i="AFFECT_TYPE">
|
||||
{
|
||||
FLUSH//# clears out affected entity's prior commands first
|
||||
INSERT//# inserts command into affected entity's current list
|
||||
}
|
||||
|
||||
<%i="CAMERA_COMMANDS">
|
||||
{
|
||||
ENABLE//## %% # Puts game in camera mode // no more parms
|
||||
DISABLE//## %% # Takes game out of camera mode //no more parms
|
||||
ZOOM//## %f="0.0" %d="0" # Normal is 80, 10 is zoomed in, max is 120. Second value is time in ms to take to zoom to the new FOV
|
||||
MOVE//## %v="0.0 0.0 0.0" %d="0" # Move to a absolute vector origin or TAG("targetname", ORIGIN) over time over number of milliseconds
|
||||
PAN//## %v="0.0 0.0 0.0" %v="0.0 0.0 0.0" %d="0" # Pan to absolute angle from current angle in dir (no dir will use shortest) over number of milliseconds
|
||||
ROLL//## %f="0.0" %d="0" # Roll to relative angle offsets of current angle over number of milliseconds
|
||||
TRACK//## %s="trackName" %f="0.0" %d="0" # Get on track and move at speed, last number is whether or not to lerp to the start pos
|
||||
FOLLOW//## %s="cameraGroup" %f="0.0" %d="0" # Follow ents with matching cameraGroup at angleSpeed, last number is whether or not to lerp to the start angle
|
||||
DISTANCE//## %f="0.0" %d="0" # Keep this distance from cameraGroup (if any), last number is whether or not to lerp to the start angle
|
||||
FADE//## %v="0.0 0.0 0.0" %f="0.0" %v="0.0 0.0 0.0" %f="0.0" %d="0" # Fade from [start Red Green Blue], [Opacity] to [end Red Green Blue], [Opacity] (all fields valid ranges are 0 to 1) over [number of milliseconds]
|
||||
SHAKE//## %f="0.0" %d="0" # Intensity (0-16) and duration, in milliseconds
|
||||
PATH//## %s="filename" !!"S:\base\!!scripts\*.rof" # Play a ROFF on a camera
|
||||
}
|
||||
|
||||
<%i="TAG_TYPE">
|
||||
{
|
||||
ORIGIN
|
||||
ANGLES
|
||||
}
|
||||
|
||||
<%s="PLAY_TYPES">
|
||||
{
|
||||
#include "IGInterface.h" playType_e
|
||||
}
|
||||
|
||||
|
||||
|
||||
// these must be left in this order, since they mirror the order of icons in res/bitmap1.bmp
|
||||
//
|
||||
<%i="ICON_OVERRIDES">
|
||||
{
|
||||
I_BRACE
|
||||
I_EVENT
|
||||
I_MACRO
|
||||
I_SPACE
|
||||
//
|
||||
I_SOUND
|
||||
I_CAMERA
|
||||
I_ROTATE
|
||||
I_REMOVE
|
||||
I_SET
|
||||
I_MOVE
|
||||
I_IF
|
||||
I_LOOP
|
||||
I_DO
|
||||
I_WAIT
|
||||
I_DOWAIT
|
||||
I_SIGNAL
|
||||
I_WAITSIGNAL
|
||||
I_FLUSH
|
||||
I_WAITCLOCK
|
||||
}
|
||||
|
||||
//#=== Flow control commands ============================================
|
||||
|
||||
[I_FLUSH] flush();//# clear all previous script commands on ent
|
||||
[I_IF] if ( $test expression =,<,>,! xxx$ ) {} //# if condition true, execute block of commands
|
||||
[I_IF] else () {} //# must immediately follow and else, will execute if the if condition is false
|
||||
|
||||
[I_LOOP] loop ( %d=-1 ) {} //# execute block of commands any number of times (-1 = forever)
|
||||
|
||||
affect( %s="DEFAULT", %t="AFFECT_TYPE" ) {}//# switch script affect to ent with specified name, flush old commands or insert the new block of commands into current commands
|
||||
|
||||
run ( %s="DEFAULT" ); //# ent runs specified script
|
||||
|
||||
//#=== Standard commands ================================================
|
||||
|
||||
[I_WAITCLOCK] wait( %f=1000.0 );//# script will wait specified number of milliseconds
|
||||
[I_WAITSIGNAL] waitsignal( %s="signalname" );//# wait until a signal() command is given with the name name - only one ent can wait for a particular signal
|
||||
[I_SIGNAL] signal( %s="signalname" );//# The ent waiting for this signal will continue with it's script
|
||||
|
||||
//action( %s="DEFAULT", %s="DEFAULT" );//# no longer valid, but I'll leave it in for the moment for testing
|
||||
[I_SOUND] sound( %t="CHANNELS", %s="DEFAULT" );//# play sound on specified channel of ent
|
||||
|
||||
[I_MOVE] move ( %v=<0.0 0.0 0.0>, %f=1000.0 );//# Move ent from current location to <x,y,z> over time in milliseconds #Moves absolute to location
|
||||
[I_MOVE] "moveBy"
|
||||
{
|
||||
set( %s="SET_MOVE_BY" %s="0.0 0.0 0.0 1000.0"); //# Move ent from current location by <x,y,z> over time in milliseconds #Moves relative to location
|
||||
}
|
||||
[I_MOVE] "moveDir"
|
||||
{
|
||||
set( %s="SET_MOVE" %s="0.0 0.0 0.0 500.0 1000.0"); //# Move ent from current location in direction of <x,y,z> with distance d over time in milliseconds #Moves relative to location
|
||||
}
|
||||
//[I_MOVE] move ( %v=<0.0 0.0 0.0>, %v=<0.0 0.0 0.0>, %f=1000.0 );//move ent from point to point at speed
|
||||
//move ( $default$, $default$, %f=1000.0 );//move ent from point to point at speed
|
||||
//[I_MOVE] move ( $default$, %f=1000.0 );//move ent from point to point at speed
|
||||
[I_ROTATE] rotate( %v=<0.0 0.0 0.0>, %f=1000.0 );//# rotate ent to target angles at speed
|
||||
|
||||
use ( %s="DEFAULT" );//# uses specified ent
|
||||
//use ( $get(STRING,"targetname")$ );//# uses specified ent from a get(STRING) command
|
||||
//kill ( %s="DEFAULT" );//# kills ent with specified name
|
||||
[I_REMOVE] remove ( %s="DEFAULT" ); //# removes ent with specified name from game
|
||||
|
||||
print( %s="DEFAULT" );//# Prints text to center of screen
|
||||
rem(%s="comment");//# Just a comment for script, no actual effect in-game
|
||||
|
||||
//#=== Variable Handling ===============================================
|
||||
declare( %t="DECLARE_TYPE", %s="variablename" ); //# declare a global variable here, limit of 16 per map
|
||||
|
||||
free( %s="variablename" ); //# free a global variable so you can make more
|
||||
|
||||
//get( %t="DECLARE_TYPE", %s="variablename" ); //# OF NO USE BY ITSELF - this will be removed soon, but is still usable inside other commands
|
||||
|
||||
random( %f=0.0, %f=0.0 );//# use a random float between 2 specified values. OF NO USE BY ITSELF - this will be removed soon, but is still usable inside other commands
|
||||
|
||||
//#=== Set commands =====================================================
|
||||
|
||||
//# standard strings
|
||||
[I_SET] set( %t="SET_TYPES", %s="DEFAULT" );//# standard set commands
|
||||
[I_SET] set( %s="variablename", %s="value" );//# set for variables
|
||||
//[I_SET] set_anim_arms( %t="PRIM", %t="HEALTH", %t="ITEM", %t="MOOD", %t="STANCE", %t="ANIMNAME"); # set animation arms
|
||||
//[I_SET] set_anim_torso( %t="PRIM", %t="HEALTH", %t="MOOD", %t="STANCE", %t="ANIMNAME"); # set animation torso
|
||||
//[I_SET] set_anim_body( %t="PRIM", %t="HEALTH", %t="MOOD", %t="STANCE", %t="ANIMNAME"); # set animation body
|
||||
|
||||
//#Camera functions
|
||||
[I_CAMERA] camera( %t="CAMERA_COMMANDS" );
|
||||
|
||||
//#Task functions
|
||||
|
||||
task( %s="DEFAULT" ) {}
|
||||
[I_DO] do( %s="DEFAULT" )
|
||||
[I_WAIT] wait( %s="DEFAULT" ) //# wait until task "taskname" is complete
|
||||
wait( $random( 0, 1 )$ ) //# wait a specified amount of time
|
||||
|
||||
[I_DOWAIT] dowait( %s="DEFAULT" ); //# shorthand form of: do("taskname"); wait("taskname")
|
||||
play (%t="PLAY_TYPES", %s="default");
|
||||
|
||||
//#=== Macros ===========================================================
|
||||
"WalkTo"
|
||||
{
|
||||
set( %s="SET_TASK", %s="WALK" );
|
||||
set( %s="SET_NAVGOAL", %s="DEFAULT" );
|
||||
}
|
||||
|
||||
"RunTo"
|
||||
{
|
||||
set( %s="SET_TASK", %s="RUN" );
|
||||
set( %s="SET_NAVGOAL", %s="DEFAULT" );
|
||||
}
|
||||
|
||||
"Path"
|
||||
{
|
||||
set( %s="SET_TASK", %s="Path" ); //# Use Path for getting around corners
|
||||
set( %s="SET_NAVGOAL", %s="DEFAULT" );
|
||||
}
|
||||
|
||||
"Crouch"
|
||||
{
|
||||
set ( %s="SET_MOOD", %s="Stealth" );
|
||||
set ( %s="SET_STANCE", %s="Crouch" );
|
||||
|
||||
}
|
||||
|
||||
"Halt Hand Signal"
|
||||
{
|
||||
set ( %s="SET_HAND_SIGNAL", %s="Halt" );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Old 1st parm locked set commands, not needed any more:
|
||||
/*
|
||||
//# vectors
|
||||
set( %r%s="SET_ORIGIN", %v=<0.0 0.0 0.0>);
|
||||
set( %r%s="SET_ANGLES", %v=<0.0 0.0 0.0>);
|
||||
set( %r%s="SET_COPY_ORIGIN", %v=<0.0 0.0 0.0>);
|
||||
|
||||
//# floats
|
||||
set( %r%s="SET_VELOCITY",%f=0.0);
|
||||
set( %r%s="SET_XVELOCITY",%f=0.0);
|
||||
set( %r%s="SET_YVELOCITY",%f=0.0);
|
||||
set( %r%s="SET_ZVELOCITY",%f=0.0);
|
||||
set( %r%s="SET_AVELOCITY",%f=0.0);
|
||||
set( %r%s="SET_DPITCH",%f=0.0);
|
||||
set( %r%s="SET_DYAW",%f=0.0);
|
||||
set( %r%s="SET_TIMESCALE",%f=0.0);
|
||||
set( %r%s="SET_VISRANGE",%f=0.0);
|
||||
set( %r%s="SET_EARSHOT",%f=0.0);
|
||||
set( %r%s="SET_VIGILANCE",%f=0.0);
|
||||
|
||||
//# ints
|
||||
set( %r%s="SET_ANIM_HOLDTIME_LOWER",%d=0);
|
||||
set( %r%s="SET_ANIM_HOLDTIME_UPPER",%d=0);
|
||||
set( %r%s="SET_HEALTH",%d=0);
|
||||
set( %r%s="SET_WALKSPEED",%d=0);
|
||||
set( %r%s="SET_RUNSPEED",%d=0);
|
||||
set( %r%s="SET_YAWSPEED",%d=0);
|
||||
set( %r%s="SET_FRICTION",%d=0);
|
||||
set( %r%s="SET_SHOOTDIST",%d=0);
|
||||
set( %r%s="SET_HFOV",%d=0);
|
||||
set( %r%s="SET_VFOV",%d=0);
|
||||
set( %r%s="SET_DELAYSCRIPTTIME",%d=0);
|
||||
set( %r%s="SET_FORWARDMOVE",%d=0);
|
||||
set( %r%s="SET_RIGHTMOVE",%d=0);
|
||||
set( %r%s="SET_AGGRESSION",%d=0);//# 1 - 5
|
||||
set( %r%s="SET_AIM",%d=0);//# 1 - 5
|
||||
|
||||
//# booleans and simple calls
|
||||
set( %r%s="SET_SCRIPTED",%t="BOOL_TYPES");
|
||||
set( %r%s="SET_HIDING",%t="BOOL_TYPES");
|
||||
set( %r%s="SET_IGNOREPAIN",%t="BOOL_TYPES");
|
||||
set( %r%s="SET_IGNOREENEMIES",%t="BOOL_TYPES");
|
||||
set( %r%s="SET_STRAIGHTTOGOAL",%t="BOOL_TYPES");
|
||||
set( %r%s="SET_DONTSHOOT",%t="BOOL_TYPES");
|
||||
set( %r%s="SET_NOTARGET",%t="BOOL_TYPES");
|
||||
set( %r%s="SET_CROUCHED",%t="BOOL_TYPES");
|
||||
set( %r%s="SET_WALKING",%t="BOOL_TYPES");
|
||||
set( %r%s="SET_CAREFUL",%t="BOOL_TYPES");
|
||||
set( %r%s="SET_UNDYING",%t="BOOL_TYPES");
|
||||
set( %r%s="SET_NOAVOID",%t="BOOL_TYPES");
|
||||
set( %r%s="SET_BEAM",%t="BOOL_TYPES");
|
||||
set( %r%s="SET_CREATEFORMATION",%t="BOOL_TYPES");
|
||||
|
||||
//# Behavior state settings
|
||||
set( %r%s="BSTATE", %t="BSTATE_STRINGS" );
|
||||
set( %r%s="defaultBState", %t="BSTATE_STRINGS" );
|
||||
set( %r%s="tempBehavior", %t="BSTATE_STRINGS" );
|
||||
|
||||
//# Animation settings
|
||||
set( %r%s="anim_upper", %t="ANIM_NAMES" );
|
||||
set( %r%s="anim_lower", %t="ANIM_NAMES" );
|
||||
set( %r%s="anim_both", %t="ANIM_NAMES" );
|
||||
|
||||
//#Enemy team table
|
||||
set( %r%s="playerTeam", %t="TEAM_NAMES" );
|
||||
set( %r%s="enemyTeam", %t="TEAM_NAMES" );
|
||||
|
||||
//#Weapon table
|
||||
set( %r%s="weapon", %t="WEAPON_NAMES" );
|
||||
|
||||
//#Lean side table
|
||||
set( %r%s="LEAN", %t="LEAN_TYPES" );//# left, right, or none
|
||||
|
||||
//#Event/effect table
|
||||
set( %r%s="event", %s="default" );//# not implemented
|
||||
|
||||
//Old hardcoded camera commands
|
||||
camera( %r%s="ORIGIN", %v=<0.0 0.0 0.0> );
|
||||
camera( %r%s="ANGLES", %v=<0.0 0.0 0.0> );
|
||||
camera( %r%s="FOV", %f=0.0 );
|
||||
camera( %r%s="MOVE", %v=<0.0 0.0 0.0>, %f=0.0 );
|
||||
camera( %r%s="PAN", %v=<0.0 0.0 0.0>, %f=0.0 );
|
||||
camera( %r%s="ZOOM", %f=0.0, %f=0.0 );
|
||||
camera( %r%s="FADE", %v=<0.0 0.0 0.0>, %f=0.0, %v=<0.0 0.0 0.0>, %f=0.0, %f=0.0 );
|
||||
camera( %r%s="ENABLE" );
|
||||
camera( %r%s="DISABLE" );
|
||||
*/
|
||||
|
BIN
bin/BehavEd.exe
Normal file
BIN
bin/BehavEd.exe
Normal file
Binary file not shown.
BIN
bin/ConfusEditor.exe
Normal file
BIN
bin/ConfusEditor.exe
Normal file
Binary file not shown.
BIN
bin/IBIze.exe
Normal file
BIN
bin/IBIze.exe
Normal file
Binary file not shown.
BIN
bin/MD3View.exe
Normal file
BIN
bin/MD3View.exe
Normal file
Binary file not shown.
18
bin/README.txt
Normal file
18
bin/README.txt
Normal file
|
@ -0,0 +1,18 @@
|
|||
October 15th, 2002 - Thank you for downloading the sof2sdk-101b.zip file. This release contains the .ini
|
||||
files for AnimatEd and SklView which allow you to change the load location for SDK files.
|
||||
|
||||
For exampe if you installed the SDK in E:\SOF2SDK, this should be entered into each file.
|
||||
|
||||
Both programs will assume that the base directory is one level deeper than your SDK directory. The
|
||||
programs also assume the ext_data and skeletons directories are a level lower than that:
|
||||
|
||||
So if I installed in C:\SDK, I unpacked the pk3's and made a base
|
||||
structure like this:
|
||||
C:\SDK\base\skeletons
|
||||
C:\SDK\base\ext_data
|
||||
|
||||
As always, these tools are released "as is" with no support from Raven Software or Activision.
|
||||
|
||||
Happy Modding!
|
||||
|
||||
- The SOF2 Development Team
|
BIN
bin/SklView.exe
Normal file
BIN
bin/SklView.exe
Normal file
Binary file not shown.
BIN
bin/SoF2MPDev.exe
Normal file
BIN
bin/SoF2MPDev.exe
Normal file
Binary file not shown.
1
bin/animatEd.ini
Normal file
1
bin/animatEd.ini
Normal file
|
@ -0,0 +1 @@
|
|||
C:\SDK
|
|
@ -96,31 +96,11 @@ Grenade Launcher, uses 40mm rounds
|
|||
*/
|
||||
|
||||
|
||||
/*QUAKED pickup_weapon_M67 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Grenade
|
||||
*/
|
||||
|
||||
|
||||
/*QUAKED pickup_weapon_M84 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Grenade
|
||||
*/
|
||||
|
||||
|
||||
/*QUAKED pickup_weapon_F1 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Grenade
|
||||
*/
|
||||
|
||||
|
||||
/*QUAKED pickup_weapon_L2A2 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Grenade
|
||||
*/
|
||||
|
||||
|
||||
/*QUAKED pickup_weapon_MDN11 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Grenade
|
||||
*/
|
||||
|
||||
|
||||
/*QUAKED pickup_weapon_SMOHG92 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Grenade
|
||||
*/
|
||||
|
@ -136,6 +116,11 @@ White Phosphorus Grenade
|
|||
*/
|
||||
|
||||
|
||||
/*QUAKED pickup_weapon_MP5 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Sub-Machinegun, uses 9mm rounds
|
||||
*/
|
||||
|
||||
|
||||
/*QUAKED pickup_ammo_45 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
*/
|
||||
|
||||
|
@ -339,6 +324,11 @@ A bmodel that just sits there, doing nothing. Can be used for conditional walls
|
|||
*/
|
||||
|
||||
|
||||
/*QUAKED func_wall (0 .5 .8) ? START_OFF
|
||||
A func wall can be turned off and on by targetting it.
|
||||
*/
|
||||
|
||||
|
||||
/*QUAKED func_rotating (0 .5 .8) ? START_ON - X_AXIS Y_AXIS
|
||||
You need to have an origin brush as part of this entity. The center of that brush will be
|
||||
the point around which it is rotated. It will rotate around the Z axis by default. You can
|
||||
|
@ -467,6 +457,14 @@ in site, closest in distance
|
|||
*/
|
||||
|
||||
|
||||
/*QUAKED target_effect (0 0.5 0) (-8 -8 -8) (8 8 8)
|
||||
Plays an effect each time its targetted
|
||||
|
||||
"effect" effect to play
|
||||
"delay" delay in milliseconds before the effect plays
|
||||
*/
|
||||
|
||||
|
||||
/*QUAKED trigger_multiple (.5 .5 .5) ?
|
||||
"wait" : Seconds between triggerings, 0.5 default, -1 = one time only.
|
||||
"random" wait variance, default is 0
|
||||
|
@ -537,4 +535,34 @@ so, the basic time between firing is a random time between
|
|||
|
||||
*/
|
||||
|
||||
/*QUAKED info_null (0 0.5 0) (-4 -4 -4) (4 4 4)
|
||||
Used as a positional target for calculations in the utilities (spotlights, etc), but removed during gameplay.
|
||||
*/
|
||||
|
||||
|
||||
/*QUAKED light (0 1 0) (-8 -8 -8) (8 8 8) nonlinear angle negative_spot negative_point q3map_non-dynamic
|
||||
Non-displayed light.
|
||||
"light" overrides the default 300 intensity.
|
||||
Nonlinear checkbox gives inverse square falloff instead of linear
|
||||
Lights pointed at a target will be spotlights.
|
||||
"radius" overrides the default 64 unit radius of a spotlight at the target point.
|
||||
"scale" light falloff, 4.5 was used in the example map.
|
||||
"_color" rgb percentage - red is 1 0 0, decimals are allowed.
|
||||
"target" the targetname of the info_null the light is pointing to
|
||||
"targetname" for switching, the name of the light, switch would have same target.
|
||||
"style" the style or appearance of the light given off.
|
||||
0 normal
|
||||
1 FLICKER (first variety)
|
||||
2 SLOW STRONG PULSE
|
||||
3 CANDLE (first variety)
|
||||
4 FAST STROBE
|
||||
5 GENTLE PULSE 1
|
||||
6 FLICKER (second variety)
|
||||
7 CANDLE (second variety)
|
||||
8 CANDLE (third variety)
|
||||
9 SLOW STROBE (fourth variety)
|
||||
10 FLUORESCENT FLICKER
|
||||
11 SLOW PULSE NOT FADE TO BLACK
|
||||
12 FAST PULSE
|
||||
13 Test Blending
|
||||
*/
|
||||
|
|
1
bin/sklview.ini
Normal file
1
bin/sklview.ini
Normal file
|
@ -0,0 +1 @@
|
|||
C:\SDK
|
42
bin/sof2.qe4
Normal file
42
bin/sof2.qe4
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"basepath" "S:\base"
|
||||
"remotebasepath" "S:\base"
|
||||
"texturepath" "S:\base\textures"
|
||||
"entitypath" "S:\gamecode\*.cpp"
|
||||
"mapspath" "S:\base\maps"
|
||||
"rshcmd" "ts S:\bin\"
|
||||
"autosave" "C:\ravenlocal\sof2\autosave.map"
|
||||
"bsp FullVis (patchshadows)" "!sof2map -bsp $ -class 4 && !sof2map -vis $ -class 2 && !sof2map -light -patchshadows $"
|
||||
"bsp FullVis (visible lighting)" "!sof2map -bsp $ -class 4 && !sof2map -vis -saveprt $ -class 2 && !sof2map -vlight $ -class 2"
|
||||
"bsp FullVis (vertex lighting)" "!sof2map -bsp $ -class 4 && !sof2map -vis $ -class 2 && !sof2map -light -vertexlighting $ -class 2"
|
||||
"bsp FullVis (extra)" "!sof2map -bsp $ -class 4 && !sof2map -vis $ -class 2 && !sof2map -light -extra $"
|
||||
"bsp FullVis (1/2 LMs)" "!sof2map -bsp -samplesize 32 $ -class 4 && !sof2map -vis $ -class 2 && !sof2map -light -extra -samplesize 32 $"
|
||||
"bsp FullVis" "!sof2map -bsp $ -class 4 && !sof2map -vis $ -class 2 && !sof2map -light $"
|
||||
"bsp FullVis (nolight)" "!sof2map -bsp $ -class 4 && !sof2map -vis $ -class 2"
|
||||
"bsp FullVis (lowmem)" "!sof2map -bsp $ -class 4 && !sof2map -vis -nopassage $ -class 2 && !sof2map -light $"
|
||||
"bsp FullVis (lesmem)" "!sof2map -bsp $ -class 4 && !sof2map -vis -passageOnly $ -class 2 && !sof2map -light $"
|
||||
"bsp FastVis" "!sof2map -bsp $ -class 4 && !sof2map -vis -fast $ -class 3 && !sof2map -light $"
|
||||
"bsp FastVis (nolight)" "!sof2map -bsp $ -class 4 && !sof2map -vis -fast $ -class 3"
|
||||
"bsp Instance" "!sof2map -bsp -rename $ -class 4 && !sof2map -light $"
|
||||
"bsp Instance (extra)" "!sof2map -bsp -rename $ -class 4 && !sof2map -light -extra $"
|
||||
"bsp Novis Showseams (nolight)" "!sof2map -bsp -showseams $ -class 4"
|
||||
"bsp Novis (nolight)" "!sof2map -bsp $ -class 4"
|
||||
"bsp Relight" "s:\bin\sof2map -bsp -onlyents $ -class 4 && !sof2map -light $"
|
||||
"bsp Relight (extra)" "s:\bin\sof2map -bsp -onlyents $ -class 4 && !sof2map -light -extra $"
|
||||
"bsp Relight (extra wide)" "s:\bin\sof2map -bsp -onlyents $ -class 4 && !sof2map -light -extrawide $"
|
||||
"bsp Relight (1/2 LM)" "s:\bin\sof2map -bsp -onlyents $ && !sof2map -light -extra -samplesize 32 $"
|
||||
"bsp [LOCAL] FullVis" "s:\bin\sof2map -all $"
|
||||
"bsp [LOCAL] FullVis (extra)" "S:\bin\sof2map -bsp $ && S:\bin\sof2map -vis $ && S:\bin\sof2map -light -extra $"
|
||||
"bsp [LOCAL] FullVis (1/2 LMs)" "s:\bin\sof2map -bsp -samplesize 32 $ && s:\bin\sof2map -vis $ && s:\bin\sof2map -light -extra -samplesize 32 $"
|
||||
"bsp [LOCAL] FullVis (nolight)" "S:\bin\sof2map -bsp $ && S:\bin\sof2map -vis $"
|
||||
"bsp [LOCAL] FastVis (nolight)" "S:\bin\sof2map -bsp $ && S:\bin\sof2map -vis -fast $"
|
||||
"bsp [LOCAL] FastVis" "S:\bin\sof2map -bsp $ && S:\bin\sof2map -vis -fast $ && S:\bin\sof2map -light $"
|
||||
"bsp [LOCAL] Instance" "S:\bin\sof2map -bsp -rename $ && s:\bin\sof2map -light $"
|
||||
"bsp [LOCAL] Instance (extra)" "S:\bin\sof2map -bsp -rename $ && s:\bin\sof2map -light -extra $"
|
||||
"bsp [LOCAL] NoVis" "S:\bin\sof2map -bsp $"
|
||||
"bsp [LOCAL] OnlyEnts" "S:\bin\sof2map -bsp -onlyents $"
|
||||
"bsp [LOCAL] Info" "S:\bin\sof2map -info $"
|
||||
"bsp [LOCAL] Relight (extra)" "s:\bin\sof2map -bsp -onlyents $ && s:\bin\sof2map -light -extra $"
|
||||
"bsp [LOCAL] Relight (1/2 LM)" "s:\bin\sof2map -bsp -onlyents $ && s:\bin\sof2map -light -extra -samplesize 32 $"
|
||||
"brush_primit" "0"
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"basepath" "..\base"
|
||||
"rshcmd" ""
|
||||
"remotebasepath" "..\base"
|
||||
"entitypath" "__QERPATH*.def"
|
||||
"texturepath" "..\base\textures"
|
||||
"autosave" "..\base\maps\autosave.map"
|
||||
|
||||
"bsp FullVis (1/2 LMs)" "__QERPATHsof2map -bsp -rename -samplesize 32 $ -class 4 && __QERPATHsof2map -vis $ -class 2 && __QERPATHsof2map -light -extra -samplesize 32 $"
|
||||
"bsp FullVis" "__QERPATHsof2map -bsp -rename $ && __QERPATHsof2map -vis $ && __QERPATHsof2map -light $"
|
||||
"bsp FullVis (extra)" "__QERPATHsof2map -bsp -rename $ && __QERPATHsof2map -vis $ && __QERPATHsof2map -light -extra $"
|
||||
"bsp FullVis (nolight)" "__QERPATHsof2map -bsp -rename $ && __QERPATHsof2map -vis $"
|
||||
"bsp FastVis (nolight)" "__QERPATHsof2map -bsp -rename $ && __QERPATHsof2map -vis -fast $"
|
||||
"bsp FastVis" "__QERPATHsof2map -bsp -rename $ && __QERPATHsof2map -vis -fast $ && __QERPATHsof2map -light $"
|
||||
"bsp NoVis" "__QERPATHlocalbatch\novis.bat $"
|
||||
"bsp OnlyEnts" "__QERPATHsof2map -bsp -rename -onlyents $"
|
||||
"bsp Info" "__QERPATHsof2map -info $"
|
||||
"bsp Relight (extra)" "__QERPATHsof2map -bsp -rename -onlyents $ && __QERPATHsof2map -light -extra $"
|
||||
"bsp Relight (1/2 LM)" "__QERPATHsof2map -bsp -rename -onlyents $ && __QERPATHsof2map -light -extra -samplesize 32 $"
|
||||
"brush_primit" "0"
|
||||
|
||||
}
|
||||
|
BIN
bin/sof2sdk-eula.doc
Normal file
BIN
bin/sof2sdk-eula.doc
Normal file
Binary file not shown.
BIN
bin/striped.exe
Normal file
BIN
bin/striped.exe
Normal file
Binary file not shown.
|
@ -1,31 +1,31 @@
|
|||
# Microsoft Developer Studio Project File - Name="Sof2MP" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Project File - Name="SoF2MP" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Generic Project" 0x010a
|
||||
|
||||
CFG=Sof2MP - Win32 Debug
|
||||
CFG=SoF2MP - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Sof2MP.mak".
|
||||
!MESSAGE NMAKE /f "SoF2MP.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Sof2MP.mak" CFG="Sof2MP - Win32 Debug"
|
||||
!MESSAGE NMAKE /f "SoF2MP.mak" CFG="SoF2MP - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Sof2MP - Win32 Release" (based on "Win32 (x86) Generic Project")
|
||||
!MESSAGE "Sof2MP - Win32 Debug" (based on "Win32 (x86) Generic Project")
|
||||
!MESSAGE "SoF2MP - Win32 Release" (based on "Win32 (x86) Generic Project")
|
||||
!MESSAGE "SoF2MP - Win32 Debug" (based on "Win32 (x86) Generic Project")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
MTL=midl.exe
|
||||
|
||||
!IF "$(CFG)" == "Sof2MP - Win32 Release"
|
||||
!IF "$(CFG)" == "SoF2MP - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
|
@ -38,7 +38,7 @@ MTL=midl.exe
|
|||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ELSEIF "$(CFG)" == "Sof2MP - Win32 Debug"
|
||||
!ELSEIF "$(CFG)" == "SoF2MP - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
|
@ -55,7 +55,7 @@ MTL=midl.exe
|
|||
|
||||
# Begin Target
|
||||
|
||||
# Name "Sof2MP - Win32 Release"
|
||||
# Name "Sof2MP - Win32 Debug"
|
||||
# Name "SoF2MP - Win32 Release"
|
||||
# Name "SoF2MP - Win32 Debug"
|
||||
# End Target
|
||||
# End Project
|
||||
|
|
111
code/Sof2MP.dsw
111
code/Sof2MP.dsw
|
@ -3,6 +3,45 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
|
|||
|
||||
###############################################################################
|
||||
|
||||
Project: "SoF2MP"=.\SoF2MP.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name gt_ctf
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name gt_dem
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name gt_dm
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name gt_elim
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name gt_inf
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name gt_tdm
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name SoF2cgame
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name SoF2game
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name ui
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "SoF2cgame"=.\cgame\sof2_cgame.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
|
@ -27,54 +66,6 @@ Package=<4>
|
|||
|
||||
###############################################################################
|
||||
|
||||
Project: "SoF2ui"=.\ui\sof2_ui.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "Sof2MP"=.\Sof2MP.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name SoF2cgame
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name SoF2game
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name SoF2ui
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name gt_ctf
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name gt_dm
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name gt_elim
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name gt_inf
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name gt_tdm
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "gt_ctf"=.\gametype\gt_ctf\gt_ctf.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
|
@ -87,6 +78,18 @@ Package=<4>
|
|||
|
||||
###############################################################################
|
||||
|
||||
Project: "gt_dem"=.\gametype\gt_dem\gt_dem.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "gt_dm"=.\gametype\gt_dm\gt_dm.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
|
@ -135,6 +138,18 @@ Package=<4>
|
|||
|
||||
###############################################################################
|
||||
|
||||
Project: "ui"=.\ui\sof2_ui.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
|
|
11
code/all.bat
11
code/all.bat
|
@ -1,5 +1,5 @@
|
|||
@set include=
|
||||
@del /q ..\base\vm
|
||||
@del /q debug\base\mp\vm
|
||||
@cd game
|
||||
call game.bat
|
||||
@cd ..\cgame
|
||||
|
@ -12,6 +12,8 @@ call gt_ctf.bat
|
|||
call gt_inf.bat
|
||||
@cd ..\gt_elim
|
||||
call gt_elim.bat
|
||||
@cd ..\gt_dem
|
||||
call gt_dem.bat
|
||||
@cd ..\gt_dm
|
||||
call gt_dm.bat
|
||||
@cd ..\gt_tdm
|
||||
|
@ -36,6 +38,8 @@ if not exist "gametype\gt_tdm\vm\gt_tdm.qvm" goto badTDM
|
|||
if not exist "gametype\gt_ctf\vm\gt_ctf.qvm" goto badCTF
|
||||
:testinf
|
||||
if not exist "gametype\gt_inf\vm\gt_inf.qvm" goto badINF
|
||||
:testdem
|
||||
if not exist "gametype\gt_dem\vm\gt_dem.qvm" goto badDEM
|
||||
:testelim
|
||||
if not exist "gametype\gt_elim\vm\gt_elim.qvm" goto badELIM
|
||||
if %bad == "0" goto goodBuild
|
||||
|
@ -81,6 +85,11 @@ echo ***** gt_elim.qvm did not build!
|
|||
set bad = 1
|
||||
goto end
|
||||
|
||||
:badDEM
|
||||
echo ***** gt_dem.qvm did not build!
|
||||
set bad = 1
|
||||
goto end
|
||||
|
||||
:goodBuild
|
||||
echo VMs were built successfully!
|
||||
|
||||
|
|
|
@ -112,6 +112,8 @@ stringID_table_t bg_animTable [MAX_ANIMATIONS+1] =
|
|||
ENUM2STRING(TORSO_RELOAD_MM1_SHELL),
|
||||
ENUM2STRING(TORSO_RELOAD_MM1_END),
|
||||
|
||||
ENUM2STRING(TORSO_USE),
|
||||
|
||||
//must be terminated
|
||||
NULL,-1
|
||||
};
|
||||
|
|
|
@ -244,7 +244,7 @@ void CG_Drop_f ( void )
|
|||
|
||||
// Go to next weapon before the current drops
|
||||
exclude = cg.weaponSelect;
|
||||
cg.weaponSelect = WP_M67_GRENADE;
|
||||
cg.weaponSelect = WP_M84_GRENADE;
|
||||
CG_PrevWeapon ( qfalse, exclude );
|
||||
|
||||
// Send server comand
|
||||
|
@ -300,6 +300,27 @@ static void CG_WeaponToggle_f ( void )
|
|||
gitem_t* item;
|
||||
int i;
|
||||
|
||||
if ( !cg.snap )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( cg.predictedPlayerState.stats[STAT_USEWEAPONDROP] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( cg.snap->ps.pm_flags & PMF_FOLLOW )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( cg.predictedPlayerState.weaponstate == WEAPON_CHARGING ||
|
||||
cg.predictedPlayerState.weaponstate == WEAPON_CHARGING_ALT )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the toggle groups
|
||||
group1 = CG_GetOutfittingGroupFromString ( CG_Argv(1) );
|
||||
group2 = CG_GetOutfittingGroupFromString ( CG_Argv(2) );
|
||||
|
@ -371,6 +392,12 @@ be selected
|
|||
*/
|
||||
static void CG_NextWeapon_f ( void )
|
||||
{
|
||||
if ( cg_zoomWeaponChange.integer && (cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) )
|
||||
{
|
||||
trap_SendConsoleCommand ( "+zoomin; wait; -zoomin;" );
|
||||
return;
|
||||
}
|
||||
|
||||
CG_NextWeapon ( qtrue, -1 );
|
||||
}
|
||||
|
||||
|
@ -384,6 +411,12 @@ to be selectd
|
|||
*/
|
||||
static void CG_PrevWeapon_f ( void )
|
||||
{
|
||||
if ( cg_zoomWeaponChange.integer && (cg.predictedPlayerState.pm_flags & PMF_ZOOMED) )
|
||||
{
|
||||
trap_SendConsoleCommand ( "+zoomout; wait; -zoomout;" );
|
||||
return;
|
||||
}
|
||||
|
||||
CG_PrevWeapon ( qtrue, -1 );
|
||||
}
|
||||
|
||||
|
@ -553,6 +586,7 @@ void CG_InitConsoleCommands( void )
|
|||
//
|
||||
trap_AddCommand ("kill");
|
||||
trap_AddCommand ("say");
|
||||
trap_AddCommand ("ignore");
|
||||
trap_AddCommand ("say_team");
|
||||
trap_AddCommand ("tell");
|
||||
trap_AddCommand ("vsay_team");
|
||||
|
|
|
@ -273,6 +273,9 @@ void CG_DrawRadar ( void )
|
|||
break;
|
||||
|
||||
case ET_PLAYER:
|
||||
{
|
||||
vec4_t color;
|
||||
|
||||
cl = &cgs.clientinfo[ cent->currentState.number ];
|
||||
|
||||
// not valid then dont draw it
|
||||
|
@ -281,6 +284,15 @@ void CG_DrawRadar ( void )
|
|||
continue;
|
||||
}
|
||||
|
||||
if ( cent->currentState.gametypeitems )
|
||||
{
|
||||
VectorCopy4 ( g_color_table[ColorIndex(COLOR_YELLOW)], color );
|
||||
}
|
||||
else
|
||||
{
|
||||
VectorCopy4 ( teamColor, color );
|
||||
}
|
||||
|
||||
if (cl->mLastChatTime+RADAR_CHAT_DURATION > cg.time)
|
||||
{
|
||||
vec3_t finalColor;
|
||||
|
@ -288,16 +300,16 @@ void CG_DrawRadar ( void )
|
|||
scale = ((cg.time - cl->mLastChatTime) / (float)RADAR_CHAT_DURATION);
|
||||
scale *= scale;
|
||||
|
||||
finalColor[0] = (teamColor[0] * (scale)) + (colorWhite[0] * (1.0-scale));
|
||||
finalColor[1] = (teamColor[1] * (scale)) + (colorWhite[1] * (1.0-scale));
|
||||
finalColor[2] = (teamColor[2] * (scale)) + (colorWhite[2] * (1.0-scale));
|
||||
finalColor[3] = teamColor[3];
|
||||
finalColor[0] = (color[0] * (scale)) + (colorWhite[0] * (1.0-scale));
|
||||
finalColor[1] = (color[1] * (scale)) + (colorWhite[1] * (1.0-scale));
|
||||
finalColor[2] = (color[2] * (scale)) + (colorWhite[2] * (1.0-scale));
|
||||
finalColor[3] = color[3];
|
||||
trap_R_SetColor ( finalColor );
|
||||
scale += 1.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
trap_R_SetColor ( teamColor );
|
||||
trap_R_SetColor ( color );
|
||||
scale = 1.0;
|
||||
}
|
||||
|
||||
|
@ -308,6 +320,7 @@ void CG_DrawRadar ( void )
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
trap_R_SetColor ( colorWhite );
|
||||
CG_DrawRotatePic2( RADAR_X + RADAR_RADIUS, RADAR_Y + RADAR_RADIUS, arrow_w, arrow_h,
|
||||
|
@ -324,6 +337,22 @@ static void CG_DrawTeamScores ( float y )
|
|||
char scores[2][16];
|
||||
float w;
|
||||
const char* s;
|
||||
vec4_t fade = {1,1,1,0.7f};
|
||||
float x1;
|
||||
float y1;
|
||||
float x2;
|
||||
float y2;
|
||||
|
||||
// Make sure the radar should be showing
|
||||
if ( cg.weaponMenuUp )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( cgs.clientinfo[cg.predictedPlayerState.clientNum].team == TEAM_SPECTATOR )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( cgs.scores1 == SCORE_NOT_PRESENT )
|
||||
{
|
||||
|
@ -343,12 +372,71 @@ static void CG_DrawTeamScores ( float y )
|
|||
Com_sprintf (scores[1], sizeof(scores[1]), "%i", cgs.scores2);
|
||||
}
|
||||
|
||||
s = va ( "Red: %s Blue: %s", scores[0], scores[1] );
|
||||
if ( cg_drawTeamScores.integer > 0 && cg_drawTeamScores.integer < 5 )
|
||||
{
|
||||
switch ( cg_drawTeamScores.integer )
|
||||
{
|
||||
default:
|
||||
case 3:
|
||||
x1 = 438;
|
||||
x2 = 400;
|
||||
y1 = 5;
|
||||
y2 = 5;
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
x1 = 430;
|
||||
y1 = 425;
|
||||
x2 = 470;
|
||||
y2 = 425;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
x1 = 340;
|
||||
y1 = 395;
|
||||
x2 = 380;
|
||||
y2 = 395;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
x1 = 600;
|
||||
x2 = 600;
|
||||
y1 = 200;
|
||||
y2 = 250;
|
||||
break;
|
||||
}
|
||||
|
||||
trap_R_SetColor ( fade );
|
||||
CG_DrawPic ( x1, y1, 32, 32, cgs.media.redFriendShader );
|
||||
CG_DrawPic ( x2, y2, 32, 32, cgs.media.blueFriendShader );
|
||||
|
||||
w = trap_R_GetTextWidth ( scores[0], cgs.media.hudFont, 0.5f, 0 );
|
||||
CG_DrawText ( x1 + 16 - w / 2, y1 + 6, cgs.media.hudFont, 0.5f, colorWhite, scores[0], 0, DT_OUTLINE );
|
||||
|
||||
w = trap_R_GetTextWidth ( scores[1], cgs.media.hudFont, 0.5f, 0 );
|
||||
CG_DrawText ( x2 + 16 - w / 2, y2 + 6, cgs.media.hudFont, 0.45f, colorWhite, scores[1], 0, DT_OUTLINE );
|
||||
|
||||
if ( cgs.gametypeData->respawnType == RT_NONE )
|
||||
{
|
||||
s = va("%d/%d", cg.predictedPlayerState.persistant[PERS_RED_ALIVE_COUNT], CG_TeamCount(TEAM_RED) );
|
||||
w = trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.35f, 0 );
|
||||
CG_DrawText ( x1 + 16 - w / 2, y1 + 24, cgs.media.hudFont, 0.35f, colorMdGrey, s, 0, DT_OUTLINE );
|
||||
|
||||
s = va("%d/%d", cg.predictedPlayerState.persistant[PERS_BLUE_ALIVE_COUNT], CG_TeamCount(TEAM_BLUE) );
|
||||
w = trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.35f, 0 );
|
||||
CG_DrawText ( x2 + 16 - w / 2, y2 + 24, cgs.media.hudFont, 0.35f, colorMdGrey, s, 0, DT_OUTLINE );
|
||||
}
|
||||
|
||||
trap_R_SetColor ( NULL );
|
||||
}
|
||||
else
|
||||
{
|
||||
s = va ( "Red: %s Blue: %s", scores[0], scores[1] );
|
||||
w = trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.35f, 0 );
|
||||
CG_DrawText ( RADAR_X + RADAR_RADIUS - w / 2, y, cgs.media.hudFont, 0.35f, g_color_table[ColorIndex(COLOR_GREEN)], s, 0, DT_OUTLINE );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=====================
|
||||
|
@ -950,6 +1038,7 @@ CG_DrawCenterText
|
|||
static void CG_DrawCenterText ( void )
|
||||
{
|
||||
int w;
|
||||
int h;
|
||||
|
||||
if ( cgs.gametypeMessageTime < cg.time )
|
||||
{
|
||||
|
@ -958,7 +1047,8 @@ static void CG_DrawCenterText ( void )
|
|||
}
|
||||
|
||||
w = trap_R_GetTextWidth( cgs.gametypeMessage, cgs.media.hudFont, 0.43f, 0 );
|
||||
CG_DrawText ( (SCREEN_WIDTH - w) / 2, cg_centerY.integer, cgs.media.hudFont, 0.43f, colorWhite, cgs.gametypeMessage, 0, DT_OUTLINE );
|
||||
h = trap_R_GetTextHeight( cgs.gametypeMessage, cgs.media.hudFont, 0.43f, 0 );
|
||||
CG_DrawText ( (SCREEN_WIDTH - w) / 2, cg_centerY.integer + h, cgs.media.hudFont, 0.43f, colorWhite, cgs.gametypeMessage, 0, DT_OUTLINE );
|
||||
}
|
||||
|
||||
|
||||
|
@ -983,6 +1073,11 @@ static void CG_DrawCrosshair(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if ( cg.predictedPlayerState.stats[STAT_USEWEAPONDROP] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// If zoomed or unzoomed with the sniper rifle dont draw the standard crosshair
|
||||
zoomed = (cg.predictedPlayerState.pm_flags&PMF_ZOOMED);
|
||||
if ( zoomed || (cg.predictedPlayerState.weapon==WP_MSG90A1 && !zoomed) )
|
||||
|
@ -1016,8 +1111,20 @@ static void CG_DrawCrosshair(void)
|
|||
w = h = cg_crosshairSize.value;
|
||||
|
||||
// Determine the
|
||||
if ( cg_crosshairGrow.integer )
|
||||
{
|
||||
scale = ((float)cg.predictedPlayerState.inaccuracy / ((float)weaponData[cg.predictedPlayerState.weapon].attack[ATTACK_NORMAL].maxInaccuracy+1));
|
||||
scale = 1 + scale * 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
scale = 1;
|
||||
}
|
||||
|
||||
if ( scale > 2 )
|
||||
{
|
||||
scale = 2;
|
||||
}
|
||||
|
||||
w = w * scale;
|
||||
h = h * scale;
|
||||
|
@ -1248,6 +1355,11 @@ static void CG_DrawSpectator(void)
|
|||
else
|
||||
s = "SPECTATOR";
|
||||
|
||||
if ( (cg.snap->ps.pm_flags & PMF_FOLLOW) )
|
||||
{
|
||||
y = 65;
|
||||
}
|
||||
|
||||
CG_DrawText ( 320 - trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.45f, 0 ) / 2,
|
||||
y, cgs.media.hudFont, 0.45f, colorWhite, s, 0, DT_OUTLINE );
|
||||
|
||||
|
@ -1381,7 +1493,7 @@ static void CG_DrawWarmup( void )
|
|||
}
|
||||
|
||||
w = trap_R_GetTextWidth(s, cgs.media.hudFont, 0.53f, 0 );
|
||||
CG_DrawText (320 - w / 2, 105, cgs.media.hudFont, 0.53f, colorWhite, s, 0, DT_OUTLINE );
|
||||
CG_DrawText (320 - w / 2, 155, cgs.media.hudFont, 0.53f, colorWhite, s, 0, DT_OUTLINE );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1443,7 +1555,7 @@ static void CG_DrawChat ( void )
|
|||
}
|
||||
else
|
||||
{
|
||||
y = 395;
|
||||
y = 380;
|
||||
x = 35;
|
||||
}
|
||||
|
||||
|
@ -1590,6 +1702,39 @@ static void CG_DrawFlashBang ( void )
|
|||
CG_FillRect ( 0, 0, 640, 480, color );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
CG_DrawHUDIcons
|
||||
|
||||
draws the currnet list of hud icons in the bottom left corner
|
||||
=================
|
||||
*/
|
||||
static void CG_DrawHUDIcons ( void )
|
||||
{
|
||||
int i;
|
||||
float x;
|
||||
|
||||
// User turn off hud icons?
|
||||
if ( !cg_drawHUDIcons.integer )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
x = 25;
|
||||
|
||||
for ( i = 0; i < MAX_HUDICONS; i ++ )
|
||||
{
|
||||
// No hud icon? skip it
|
||||
if ( !cgs.hudIcons[i] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
CG_DrawPic ( x, 425, 32, 32, cgs.gameIcons[ cgs.hudIcons[i] ] );
|
||||
|
||||
x += 40;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -1643,6 +1788,7 @@ static void CG_Draw2D( void )
|
|||
CG_DrawSpectator();
|
||||
CG_DrawCrosshair();
|
||||
CG_DrawCrosshairNames();
|
||||
CG_DrawHUDIcons();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1653,6 +1799,7 @@ static void CG_Draw2D( void )
|
|||
|
||||
if ( !cg.showScores )
|
||||
{
|
||||
CG_DrawHUDIcons();
|
||||
CG_DrawTimedMenus();
|
||||
CG_DrawCrosshair();
|
||||
CG_DrawCrosshairNames();
|
||||
|
@ -1669,16 +1816,15 @@ static void CG_Draw2D( void )
|
|||
CG_DrawUpperRight();
|
||||
}
|
||||
|
||||
if ( !CG_DrawFollow() )
|
||||
{
|
||||
CG_DrawWarmup();
|
||||
}
|
||||
|
||||
// don't draw center string if scoreboard is up
|
||||
cg.scoreBoardShowing = CG_DrawScoreboard();
|
||||
if ( !cg.scoreBoardShowing)
|
||||
{
|
||||
CG_DrawCenterText();
|
||||
if ( !CG_DrawFollow() )
|
||||
{
|
||||
CG_DrawWarmup();
|
||||
}
|
||||
}
|
||||
|
||||
// Always Draw chat
|
||||
|
@ -1726,7 +1872,7 @@ void CG_DrawActive( stereoFrame_t stereoView )
|
|||
}
|
||||
|
||||
// Popup the objectives scren if we need to
|
||||
if( cg.popupObjectives )
|
||||
if( cg.popupObjectives && !cg.demoPlayback)
|
||||
{
|
||||
char temp[MAX_INFO_STRING];
|
||||
char lastobjectives[MAX_INFO_STRING];
|
||||
|
|
|
@ -884,6 +884,7 @@ static void CG_AddCEntity( centity_t *cent )
|
|||
break;
|
||||
|
||||
case ET_MOVER:
|
||||
case ET_WALL:
|
||||
CG_Mover( cent );
|
||||
break;
|
||||
|
||||
|
|
|
@ -229,6 +229,7 @@ static void CG_Obituary( entityState_t *ent )
|
|||
message = "saw the light";
|
||||
break;
|
||||
case MOD_TRIGGER_HURT:
|
||||
case MOD_TRIGGER_HURT_NOSUICIDE:
|
||||
message = "was in the wrong place";
|
||||
break;
|
||||
case MOD_TEAMCHANGE:
|
||||
|
@ -246,11 +247,7 @@ static void CG_Obituary( entityState_t *ent )
|
|||
{
|
||||
case MOD_MM1_GRENADE_LAUNCHER:
|
||||
case MOD_RPG7_LAUNCHER:
|
||||
case MOD_M67_GRENADE:
|
||||
case MOD_M84_GRENADE:
|
||||
case MOD_F1_GRENADE:
|
||||
case MOD_L2A2_GRENADE:
|
||||
case MOD_MDN11_GRENADE:
|
||||
case MOD_SMOHG92_GRENADE:
|
||||
case MOD_ANM14_GRENADE:
|
||||
case MOD_M15_GRENADE:
|
||||
|
@ -345,22 +342,27 @@ static void CG_Obituary( entityState_t *ent )
|
|||
if ( attack == ATTACK_ALTERNATE )
|
||||
{
|
||||
message = "was bludgeoned by";
|
||||
message2 = va("'s %s", weaponParseInfo[mod].mName );
|
||||
}
|
||||
else
|
||||
{
|
||||
message = "was pumped full of lead by";
|
||||
message2 = va("'s %s", weaponParseInfo[mod].mName );
|
||||
}
|
||||
break;
|
||||
|
||||
case MOD_M1911A1_PISTOL:
|
||||
case MOD_USSOCOM_PISTOL:
|
||||
case MOD_SILVER_TALON:
|
||||
if ( attack == ATTACK_ALTERNATE )
|
||||
{
|
||||
message = "was pistol whipped by";
|
||||
message2 = va("'s %s", weaponParseInfo[mod].mName );
|
||||
}
|
||||
else
|
||||
{
|
||||
message = "was shot by";
|
||||
message2 = va("'s %s", weaponParseInfo[mod].mName );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -372,31 +374,45 @@ static void CG_Obituary( entityState_t *ent )
|
|||
else
|
||||
{
|
||||
message = "was shot by";
|
||||
message2 = va("'s %s", weaponParseInfo[mod].mName );
|
||||
}
|
||||
break;
|
||||
|
||||
case MOD_M4_ASSAULT_RIFLE:
|
||||
if ( attack == ATTACK_ALTERNATE )
|
||||
{
|
||||
message = "was detonated by";
|
||||
message2 = va("'s %s", "M203" );
|
||||
}
|
||||
else
|
||||
{
|
||||
message = "was shot by";
|
||||
message2 = va("'s %s", weaponParseInfo[mod].mName );
|
||||
}
|
||||
break;
|
||||
|
||||
case MOD_M60_MACHINEGUN:
|
||||
case MOD_MICRO_UZI_SUBMACHINEGUN:
|
||||
case MOD_MP5:
|
||||
case MOD_M3A1_SUBMACHINEGUN:
|
||||
case MOD_M4_ASSAULT_RIFLE:
|
||||
case MOD_SIG551:
|
||||
message = "was shot by";
|
||||
message2 = va("'s %s", weaponParseInfo[mod].mName );
|
||||
break;
|
||||
|
||||
case MOD_MSG90A1_SNIPER_RIFLE:
|
||||
message = "was sniped by";
|
||||
message2 = va("'s %s", weaponParseInfo[mod].mName );
|
||||
break;
|
||||
|
||||
case MOD_MM1_GRENADE_LAUNCHER:
|
||||
case MOD_RPG7_LAUNCHER:
|
||||
case MOD_M67_GRENADE:
|
||||
case MOD_M84_GRENADE:
|
||||
case MOD_F1_GRENADE:
|
||||
case MOD_L2A2_GRENADE:
|
||||
case MOD_MDN11_GRENADE:
|
||||
case MOD_SMOHG92_GRENADE:
|
||||
case MOD_ANM14_GRENADE:
|
||||
case MOD_M15_GRENADE:
|
||||
message = "was detonated by";
|
||||
message2 = va("'s %s", weaponParseInfo[mod].mName );
|
||||
break;
|
||||
|
||||
case MOD_TELEFRAG:
|
||||
|
@ -550,6 +566,11 @@ static void CG_BodyQueueCopy(centity_t *cent, int clientNum, int hitLocation, ve
|
|||
|
||||
trap_G2API_DuplicateGhoul2Instance(source->ghoul2, ¢->ghoul2);
|
||||
|
||||
if ( !cent->ghoul2 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Reset all mision bolt positions
|
||||
for ( i = 0; i < MAX_GAMETYPE_ITEMS; i ++ )
|
||||
{
|
||||
|
@ -771,6 +792,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
|
|||
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.waterWade[rand()%2], -1, -1 );
|
||||
break;
|
||||
|
||||
case EV_ITEM_PICKUP_QUIET:
|
||||
case EV_ITEM_PICKUP:
|
||||
{
|
||||
gitem_t *item;
|
||||
|
@ -783,7 +805,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
|
|||
autoswitch = (es->eventParm & ITEM_AUTOSWITCHBIT)?qtrue:qfalse;
|
||||
|
||||
// player predicted index
|
||||
index = es->eventParm & ~ITEM_AUTOSWITCHBIT;
|
||||
index = es->eventParm & ~(ITEM_AUTOSWITCHBIT|ITEM_QUIETPICKUP);
|
||||
|
||||
if ( index < 1 || index >= bg_numItems )
|
||||
{
|
||||
|
@ -792,7 +814,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
|
|||
|
||||
item = &bg_itemlist[ index ];
|
||||
|
||||
if ( item->pickup_sound )
|
||||
if ( event != EV_ITEM_PICKUP_QUIET && item->pickup_sound )
|
||||
{
|
||||
trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound ), -1, -1 );
|
||||
}
|
||||
|
@ -932,7 +954,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
|
|||
case EV_BULLET_HIT_WALL:
|
||||
DEBUGNAME("EV_BULLET_HIT_WALL");
|
||||
|
||||
if ( !(cg_antiLag.integer && cg_impactPrediction.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) )
|
||||
if ( !(cg_antiLag.integer && cg_impactPrediction.integer && !cg_synchronousClients.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) )
|
||||
{
|
||||
// eventParm contains the direction byte and the material id
|
||||
ByteToDir( (es->eventParm >> MATERIAL_BITS), dir );
|
||||
|
@ -963,7 +985,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
|
|||
}
|
||||
|
||||
#ifdef _SOF2_FLESHIMPACTPREDICTION
|
||||
if ( !(cg_antiLag.integer && cg_impactPrediction.integer >= 2 && es->otherEntityNum == cg.predictedPlayerState.clientNum ) )
|
||||
if ( !(cg_antiLag.integer && cg_impactPrediction.integer >= 2 && !!cg_synchronousClients.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) )
|
||||
#endif
|
||||
{
|
||||
int fxtype = MATERIAL_FLESH;
|
||||
|
|
|
@ -39,9 +39,18 @@ qboolean CG_ParseGametypeItems ( TGPGroup itemsGroup )
|
|||
trap_GPG_FindPairValue ( itemGroup, "model", "", temp );
|
||||
bg_itemlist[ MODELINDEX_GAMETYPE_ITEM + itemCount ].world_model[0] = (char *)trap_VM_LocalStringAlloc ( temp );
|
||||
|
||||
trap_GPG_FindPairValue ( itemGroup, "usemodel", "", temp );
|
||||
if ( *temp )
|
||||
{
|
||||
trap_G2API_InitGhoul2Model(&cg_items[MODELINDEX_GAMETYPE_ITEM+itemCount].useModel, temp, 0 , 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
// Parse bolt model file
|
||||
trap_GPG_FindPairValue ( itemGroup, "boltmodel", "", temp );
|
||||
if ( *temp )
|
||||
{
|
||||
trap_G2API_InitGhoul2Model(&cg_items[MODELINDEX_GAMETYPE_ITEM+itemCount].boltModel, temp, 0 , 0, 0, 0, 0);
|
||||
}
|
||||
cg_items[MODELINDEX_GAMETYPE_ITEM+itemCount].radius[0] = 60;
|
||||
|
||||
CG_RegisterItemVisuals ( MODELINDEX_GAMETYPE_ITEM+itemCount );
|
||||
|
|
|
@ -236,6 +236,7 @@ void CG_DoGoreFromWeapon( int weaponnum, int attack, vec3_t hitloc, vec3_t hitdi
|
|||
|
||||
// Smaller guns with pistol whip altfires
|
||||
case WP_M1911A1_PISTOL:
|
||||
case WP_SILVER_TALON:
|
||||
case WP_USSOCOM_PISTOL:
|
||||
if (attack==ATTACK_ALTERNATE)
|
||||
{ // Bonk on the head
|
||||
|
@ -292,6 +293,8 @@ void CG_DoGoreFromWeapon( int weaponnum, int attack, vec3_t hitloc, vec3_t hitdi
|
|||
|
||||
// Medium guns
|
||||
case WP_M3A1_SUBMACHINEGUN:
|
||||
case WP_MP5:
|
||||
case WP_SIG551:
|
||||
CG_AddGore(irand(PGORE_BULLET_E, PGORE_BULLET_G), flrand( 5.25f, 7.5f),
|
||||
hitloc, hitdirection, entnum, entposition, entangle, ghoul2);
|
||||
if (cg_goreDetail.integer>0)
|
||||
|
@ -380,10 +383,7 @@ void CG_DoGoreFromWeapon( int weaponnum, int attack, vec3_t hitloc, vec3_t hitdi
|
|||
// Explosions
|
||||
case WP_MM1_GRENADE_LAUNCHER:
|
||||
case WP_RPG7_LAUNCHER:
|
||||
case WP_M67_GRENADE:
|
||||
case WP_F1_GRENADE:
|
||||
case WP_L2A2_GRENADE:
|
||||
case WP_MDN11_GRENADE:
|
||||
case WP_SMOHG92_GRENADE:
|
||||
CG_AddGore(PGORE_SHRAPNEL, flrand( 14.0f, 17.0f),
|
||||
hitloc, hitdirection, entnum, entposition, entangle, ghoul2);
|
||||
if (cg_goreDetail.integer>1)
|
||||
|
@ -396,7 +396,6 @@ void CG_DoGoreFromWeapon( int weaponnum, int attack, vec3_t hitloc, vec3_t hitdi
|
|||
// Stun/char
|
||||
case WP_M84_GRENADE:
|
||||
case WP_M15_GRENADE:
|
||||
case WP_SMOHG92_GRENADE:
|
||||
CG_AddGore(PGORE_BURN, flrand( 14.0f, 18.0f),
|
||||
hitloc, hitdirection, entnum, entposition, entangle, ghoul2);
|
||||
break;
|
||||
|
@ -1183,14 +1182,16 @@ static void CG_ProcessChunk(int clientNum, centity_t *cent, TGoreChunk *chunk, v
|
|||
{
|
||||
Com_Error(ERR_DROP, "CG_ProcessChunk invalid g2 pointer for client %d\n", clientNum);
|
||||
}
|
||||
|
||||
trap_G2API_DuplicateGhoul2Instance(cent->ghoul2, &re->ghoul2);
|
||||
trap_G2API_SetRootSurface(&re->ghoul2, 0, CreateFinalName(chunk->mRoot, &Primary, &Opposite, qfalse));
|
||||
if (!re->ghoul2)
|
||||
{ // whoa, that surface caused our model to go away???
|
||||
CG_FreeLocalEntity(le);
|
||||
return;
|
||||
}
|
||||
|
||||
trap_G2API_SetRootSurface(&re->ghoul2, 0, CreateFinalName(chunk->mRoot, &Primary, &Opposite, qfalse));
|
||||
|
||||
bolt = trap_G2API_AddBolt(cent->ghoul2, 0, CreateFinalName(chunk->mBone, &Primary, &Opposite, qfalse));
|
||||
if (bolt != -1)
|
||||
{
|
||||
|
@ -1217,8 +1218,7 @@ static void CG_ProcessChunk(int clientNum, centity_t *cent, TGoreChunk *chunk, v
|
|||
ci = &cgs.clientinfo[clientNum];
|
||||
anim = &ci->animations[cent->currentState.torsoAnim & ~ANIM_TOGGLEBIT];
|
||||
animSpeed = 50.0f / anim->frameLerp;
|
||||
// trap_G2API_SetBoneAnim(re->ghoul2, 0, "model_root", 0, 0, flags, animSpeed, cg.time, -1, 0);
|
||||
// trap_G2API_SetBoneAnim(re->ghoul2, 0, "lower_lumbar", 0, 0, flags, animSpeed, cg.time, -1, 0);
|
||||
|
||||
trap_G2API_SetBoneAnim(re->ghoul2, 0, "model_root", anim->firstFrame + anim->numFrames - 1, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 0);
|
||||
trap_G2API_SetBoneAnim(re->ghoul2, 0, "lower_lumbar", anim->firstFrame + anim->numFrames - 1, anim->firstFrame + anim->numFrames, flags, animSpeed, cg.time, -1, 0);
|
||||
|
||||
|
|
|
@ -265,7 +265,19 @@ void CG_DrawInformation( void )
|
|||
cg.cheats = qtrue;
|
||||
}
|
||||
else
|
||||
{
|
||||
s = Info_ValueForKey( info, "sv_punkbuster" );
|
||||
if ( s[0] == '1' )
|
||||
{
|
||||
s = "PUNKBUSTER ENABLED";
|
||||
CG_DrawText ( 320 - trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.53f, 0 ) / 2, y,
|
||||
cgs.media.hudFont, 0.53f, colorWhite, s, 0, 0 );
|
||||
|
||||
y += PROP_HEIGHT;
|
||||
}
|
||||
|
||||
cg.cheats = qfalse;
|
||||
}
|
||||
|
||||
s = cgs.gametypeData->displayName;
|
||||
CG_DrawText ( 320 - trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.53f, 0 ) / 2, y,
|
||||
|
@ -289,6 +301,15 @@ void CG_DrawInformation( void )
|
|||
cgs.media.hudFont, 0.53f, colorWhite, s, 0, 0 );
|
||||
y += PROP_HEIGHT;
|
||||
}
|
||||
|
||||
value = atoi( Info_ValueForKey( info, "g_friendlyFire" ) );
|
||||
if ( value )
|
||||
{
|
||||
s = va( "FRIENDLY FIRE ON" );
|
||||
CG_DrawText ( 320 - trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.53f, 0 ) / 2, y,
|
||||
cgs.media.hudFont, 0.53f, colorWhite, s, 0, 0 );
|
||||
y += PROP_HEIGHT;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -302,6 +302,8 @@ typedef struct
|
|||
animation_t animations[MAX_ANIMATIONS];
|
||||
sfxHandle_t sounds[MAX_CUSTOM_SOUNDS];
|
||||
|
||||
qboolean voice;
|
||||
|
||||
} clientInfo_t;
|
||||
|
||||
// Each weapon can have multiple attacsk. SOF2 by default has 2 attacks
|
||||
|
@ -373,6 +375,7 @@ typedef struct
|
|||
float radius[MAX_ITEM_MODELS];
|
||||
|
||||
void* boltModel;
|
||||
void* useModel;
|
||||
|
||||
} itemInfo_t;
|
||||
|
||||
|
@ -709,6 +712,7 @@ typedef struct
|
|||
int timelimit;
|
||||
int maxclients;
|
||||
qboolean friendlyFire;
|
||||
qboolean punkbuster;
|
||||
char mapname[MAX_QPATH];
|
||||
char gameover[MAX_QPATH];
|
||||
|
||||
|
@ -762,6 +766,8 @@ typedef struct
|
|||
float mIRDist;
|
||||
float mIRSeeThrough;
|
||||
|
||||
int hudIcons[MAX_HUDICONS];
|
||||
|
||||
} cgs_t;
|
||||
|
||||
//==============================================================================
|
||||
|
@ -787,9 +793,11 @@ extern vmCvar_t cg_drawCrosshair;
|
|||
extern vmCvar_t cg_drawCrosshairNames;
|
||||
extern vmCvar_t cg_drawRadar;
|
||||
extern vmCvar_t cg_drawTeamScores;
|
||||
extern vmCvar_t cg_drawHUDIcons;
|
||||
extern vmCvar_t cg_crosshairX;
|
||||
extern vmCvar_t cg_crosshairY;
|
||||
extern vmCvar_t cg_crosshairSize;
|
||||
extern vmCvar_t cg_crosshairGrow;
|
||||
extern vmCvar_t cg_crosshairRGBA;
|
||||
extern vmCvar_t cg_crosshairFriendRGBA;
|
||||
extern vmCvar_t cg_draw2D;
|
||||
|
@ -881,6 +889,8 @@ extern vmCvar_t cg_bodyTime;
|
|||
|
||||
extern vmCvar_t rw_enabled;
|
||||
|
||||
extern vmCvar_t cg_zoomWeaponChange;
|
||||
|
||||
//
|
||||
// cg_main.c
|
||||
//
|
||||
|
@ -896,6 +906,8 @@ void CG_LoadMenus ( const char *menuFile);
|
|||
void CG_KeyEvent ( int key, qboolean down);
|
||||
void CG_MouseEvent ( int x, int y);
|
||||
void CG_EventHandling ( int type);
|
||||
int CG_TeamCount ( int team );
|
||||
|
||||
|
||||
//
|
||||
// cg_view.c
|
||||
|
|
|
@ -27,6 +27,7 @@ static void C_GetLerpAngles (void);
|
|||
static void C_GetModelScale (void);
|
||||
static void C_Trace (void);
|
||||
static void C_CameraShake (void);
|
||||
int CG_TeamScore ( int team );
|
||||
|
||||
/*
|
||||
================
|
||||
|
@ -132,11 +133,41 @@ int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int a
|
|||
// server is going to attempt to send out multiple broadcasts in hopes that
|
||||
// the client will receive one of them
|
||||
cg.mMapChange = qtrue;
|
||||
cgs.voteTime = cgs.voteDuration = 0;
|
||||
trap_S_ClearLoopingSounds ( qtrue );
|
||||
trap_S_StopAllSounds ( );
|
||||
trap_UI_CloseAll ( );
|
||||
return 0;
|
||||
|
||||
case CG_VOICE_EVENT:
|
||||
Com_Printf ( "voice: event %d\n", arg0 );
|
||||
switch ( arg0 )
|
||||
{
|
||||
case VEV_TALKSTART:
|
||||
if ( arg1 != cg.predictedPlayerState.clientNum )
|
||||
{
|
||||
trap_S_StartLocalSound ( trap_S_RegisterSound ( "sound/radiostart.wav" ), CHAN_AUTO );
|
||||
}
|
||||
cgs.clientinfo[arg1].voice = qtrue;
|
||||
break;
|
||||
|
||||
case VEV_TALKSTOP:
|
||||
if ( arg1 != cg.predictedPlayerState.clientNum )
|
||||
{
|
||||
trap_S_StartLocalSound ( trap_S_RegisterSound ( "sound/radiostart.wav" ), CHAN_AUTO );
|
||||
}
|
||||
cgs.clientinfo[arg1].voice = qfalse;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
case CG_GET_TEAM_COUNT:
|
||||
return CG_TeamCount ( arg0 );
|
||||
|
||||
case CG_GET_TEAM_SCORE:
|
||||
return CG_TeamScore ( arg0 );
|
||||
|
||||
default:
|
||||
Com_Error( ERR_FATAL, "vmMain: unknown command %i", command );
|
||||
break;
|
||||
|
@ -195,7 +226,6 @@ int cg_numpermanents = 0;
|
|||
weaponInfo_t cg_weapons[MAX_WEAPONS];
|
||||
itemInfo_t cg_items[MAX_ITEMS];
|
||||
|
||||
vmCvar_t con_notifyTime;
|
||||
vmCvar_t cg_centertime;
|
||||
vmCvar_t cg_centerY;
|
||||
vmCvar_t cg_runpitch;
|
||||
|
@ -211,7 +241,9 @@ vmCvar_t cg_drawCrosshair;
|
|||
vmCvar_t cg_drawCrosshairNames;
|
||||
vmCvar_t cg_drawRadar;
|
||||
vmCvar_t cg_drawTeamScores;
|
||||
vmCvar_t cg_drawHUDIcons;
|
||||
vmCvar_t cg_crosshairSize;
|
||||
vmCvar_t cg_crosshairGrow;
|
||||
vmCvar_t cg_crosshairX;
|
||||
vmCvar_t cg_crosshairY;
|
||||
vmCvar_t cg_crosshairRGBA;
|
||||
|
@ -302,6 +334,8 @@ vmCvar_t cg_weaponMenuFast;
|
|||
|
||||
vmCvar_t cg_bodyTime;
|
||||
|
||||
vmCvar_t cg_zoomWeaponChange;
|
||||
|
||||
vmCvar_t rw_enabled;
|
||||
|
||||
typedef struct
|
||||
|
@ -320,8 +354,6 @@ static cvarTable_t cvarTable[] =
|
|||
{ &cg_lockDeaths, "lock_deaths", "1", 0 },
|
||||
{ &rw_enabled, "rw_enabled", "0", 0 },
|
||||
|
||||
{ &con_notifyTime, "con_notifyTime", "3", 0 },
|
||||
|
||||
{ &cg_shellEjection, "cg_shellEjection", "1", CVAR_ARCHIVE },
|
||||
{ &cg_ignore, "cg_ignore", "0", 0 },
|
||||
{ &cg_autoswitch, "cg_autoswitch", "2", CVAR_ARCHIVE },
|
||||
|
@ -335,7 +367,9 @@ static cvarTable_t cvarTable[] =
|
|||
{ &cg_drawSnapshot, "cg_drawSnapshot", "0", CVAR_ARCHIVE },
|
||||
{ &cg_drawCrosshair, "cg_drawCrosshair", "4", CVAR_ARCHIVE },
|
||||
{ &cg_drawCrosshairNames, "cg_drawCrosshairNames", "1", CVAR_ARCHIVE },
|
||||
{ &cg_drawHUDIcons, "cg_drawHUDIcons", "1", CVAR_ARCHIVE },
|
||||
{ &cg_crosshairSize, "cg_crosshairSize", "24", CVAR_ARCHIVE },
|
||||
{ &cg_crosshairGrow, "cg_crosshairGrow", "1", CVAR_ARCHIVE },
|
||||
{ &cg_crosshairX, "cg_crosshairX", "0", CVAR_ARCHIVE },
|
||||
{ &cg_crosshairY, "cg_crosshairY", "0", CVAR_ARCHIVE },
|
||||
{ &cg_crosshairRGBA, "cg_crosshairRGBA", "1,1,1,1", CVAR_ARCHIVE },
|
||||
|
@ -438,6 +472,8 @@ static cvarTable_t cvarTable[] =
|
|||
{ &cg_weaponMenuFast, "cg_weaponMenuFast", "0", CVAR_ARCHIVE },
|
||||
|
||||
{ &cg_bodyTime, "cg_bodyTime", "0", CVAR_ARCHIVE, 0.0f, 0.0f },
|
||||
|
||||
{ &cg_zoomWeaponChange, "cg_zoomWeaponChange", "1", CVAR_ARCHIVE, 0.0f, 0.0f },
|
||||
};
|
||||
|
||||
static int cvarTableSize = sizeof( cvarTable ) / sizeof( cvarTable[0] );
|
||||
|
@ -473,6 +509,7 @@ void CG_RegisterCvars( void )
|
|||
trap_Cvar_Register(NULL, "ui_about_gametypename", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
|
||||
trap_Cvar_Register(NULL, "ui_about_scorelimit", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
|
||||
trap_Cvar_Register(NULL, "ui_about_timelimit", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
|
||||
trap_Cvar_Register(NULL, "ui_about_friendlyfire", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
|
||||
trap_Cvar_Register(NULL, "ui_about_maxclients", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
|
||||
trap_Cvar_Register(NULL, "ui_about_dmflags", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
|
||||
trap_Cvar_Register(NULL, "ui_about_mapname", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
|
||||
|
@ -516,6 +553,59 @@ static void CG_ForceModelChange( void )
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
CG_TeamScore
|
||||
==================
|
||||
*/
|
||||
int CG_TeamScore ( int team )
|
||||
{
|
||||
switch ( team )
|
||||
{
|
||||
case TEAM_RED:
|
||||
return cg.predictedPlayerState.persistant[PERS_RED_SCORE];
|
||||
|
||||
case TEAM_BLUE:
|
||||
return cg.predictedPlayerState.persistant[PERS_BLUE_SCORE];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
CG_TeamCount
|
||||
==================
|
||||
*/
|
||||
int CG_TeamCount ( int team )
|
||||
{
|
||||
int count;
|
||||
int i;
|
||||
|
||||
count = 0;
|
||||
|
||||
for ( i = 0 ; i < cgs.maxclients ; i++ )
|
||||
{
|
||||
clientInfo_t* cl;
|
||||
|
||||
cl = &cgs.clientinfo[ i ];
|
||||
|
||||
if ( !cl->infoValid )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( team != cl->team )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
count++;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
CG_UpdateTeamCountCvars
|
||||
|
@ -1853,7 +1943,7 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum )
|
|||
CG_InitHitModel( );
|
||||
|
||||
CG_LoadingString( "graphics" );
|
||||
BG_ParseInviewFile ( );
|
||||
BG_ParseInviewFile ( cgs.pickupsDisabled );
|
||||
CG_RegisterGraphics ( );
|
||||
|
||||
// CG_RegisterMission ( );
|
||||
|
@ -1885,10 +1975,16 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum )
|
|||
if ( cgs.gametypeData->description || cgs.pickupsDisabled || cgs.gametypeData->teams )
|
||||
{
|
||||
cg.popupObjectives = qtrue;
|
||||
trap_Cvar_Set ( "ui_info_showobjectives", "1" );
|
||||
}
|
||||
else
|
||||
{
|
||||
trap_Cvar_Set ( "ui_info_showobjectives", "0" );
|
||||
}
|
||||
|
||||
trap_Cvar_Set ( "ui_info_gametype", va("%i",cgs.gametype ) );
|
||||
trap_Cvar_Set ( "ui_info_objectives", cgs.gametypeData->description );
|
||||
trap_Cvar_Set ( "con_draw", cg.scoreBoardShowing?"0":"1" );
|
||||
|
||||
// remove the last loading update
|
||||
cg.infoScreenText[0] = 0;
|
||||
|
|
|
@ -57,13 +57,7 @@ static void CG_DrawPlayerSniperMagnification ( rectDef_t *rect, qhandle_t font,
|
|||
{
|
||||
const char* mag;
|
||||
|
||||
switch ( cg.predictedPlayerState.zoomFov )
|
||||
{
|
||||
default:
|
||||
case 20: mag = "5x"; break;
|
||||
case 10: mag = "10x"; break;
|
||||
case 5: mag = "20x"; break;
|
||||
}
|
||||
mag = weaponData[cg.predictedPlayerState.weapon].zoom[cg.predictedPlayerState.zoomFov].name;
|
||||
|
||||
// Center the text
|
||||
CG_DrawText (rect->x, rect->y, font, scale, color, mag, 0, 0 );
|
||||
|
@ -305,7 +299,15 @@ void CG_DrawUseIcon ( rectDef_t* rect )
|
|||
}
|
||||
|
||||
CG_DrawStretchPic ( rect->x, rect->y, rect->w, rect->h,0, 0, 1, 1, NULL,
|
||||
cgs.gameIcons [ cg.predictedPlayerState.generic1 ] );
|
||||
cgs.gameIcons [ cg.predictedPlayerState.stats[STAT_USEICON] ] );
|
||||
|
||||
if ( cg.predictedPlayerState.stats[STAT_USETIME] )
|
||||
{
|
||||
float w = 98.0f * (float)cg.predictedPlayerState.stats[STAT_USETIME] / (float)cg.predictedPlayerState.stats[STAT_USETIME_MAX];
|
||||
CG_DrawRect ( rect->x + rect->h + 10, rect->y + 9, 100, rect->h - 18, 1, colorWhite );
|
||||
CG_FillRect ( rect->x + rect->h + 11, rect->y + 10, w, rect->h - 20, colorRed );
|
||||
CG_DrawRect ( rect->x + rect->h + 11, rect->y + 10, w, rect->h - 20, 1, colorBlack );
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
@ -316,6 +318,12 @@ void CG_DrawPlayerGametypeItems ( rectDef_t* rect )
|
|||
float x;
|
||||
int i;
|
||||
|
||||
// If not in a use zone then dont bother
|
||||
if ( cg.predictedPlayerState.pm_flags & PMF_CAN_USE )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
x = rect->x;
|
||||
|
||||
for ( i = 0; i < MAX_GAMETYPE_ITEMS; i ++ )
|
||||
|
@ -560,6 +568,19 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param )
|
|||
visible = (cg.predictedPlayerState.pm_flags&PMF_ZOOMED)?qtrue:qfalse;
|
||||
flags &= ~(CG_SHOW_HUD_SNIPERSCOPE);
|
||||
}
|
||||
// Only draw the sniper clip when zoomed
|
||||
else if ( flags & CG_SHOW_HUD_SNIPERCLIP )
|
||||
{
|
||||
if ( cg.predictedPlayerState.weapon == WP_MSG90A1 )
|
||||
{
|
||||
visible = (cg.predictedPlayerState.pm_flags&PMF_ZOOMED)?qtrue:qfalse;
|
||||
flags &= ~(CG_SHOW_HUD_SNIPERCLIP);
|
||||
}
|
||||
else
|
||||
{
|
||||
visible = qfalse;
|
||||
}
|
||||
}
|
||||
// Draw the health as long as we arent zoomed
|
||||
else if ( flags & CG_SHOW_HUD_HEALTH )
|
||||
{
|
||||
|
@ -582,11 +603,14 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param )
|
|||
}
|
||||
// Should the alternate weapon information be shown?
|
||||
else if (flags & (CG_SHOW_PLAYER_ALT_WEAPONINFO|CG_HIDE_PLAYER_ALT_WEAPONINFO) )
|
||||
{
|
||||
if ( cg.predictedPlayerState.weapon == WP_MSG90A1 )
|
||||
{
|
||||
if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED )
|
||||
{
|
||||
visible = qfalse;
|
||||
}
|
||||
}
|
||||
|
||||
if ( cg.showScores )
|
||||
{
|
||||
|
@ -609,7 +633,7 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param )
|
|||
// INvert the visible flag for hidden
|
||||
if ( flags & CG_HIDE_PLAYER_ALT_WEAPONINFO )
|
||||
{
|
||||
if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED )
|
||||
if ( cg.predictedPlayerState.weapon == WP_MSG90A1 && (cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) )
|
||||
{
|
||||
visible = qfalse;
|
||||
}
|
||||
|
@ -625,7 +649,12 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param )
|
|||
// Draw the weapon info when we arent zoomed
|
||||
else if ( flags & CG_SHOW_HUD_WEAPONINFO )
|
||||
{
|
||||
visible = (cg.showScores||(cg.predictedPlayerState.pm_flags&PMF_ZOOMED))?qfalse:qtrue;
|
||||
qboolean zoomed = qfalse;
|
||||
if ( cg.predictedPlayerState.weapon == WP_MSG90A1 && (cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) )
|
||||
{
|
||||
zoomed = qtrue;
|
||||
}
|
||||
visible = (cg.showScores||zoomed)?qfalse:qtrue;
|
||||
flags &= ~(CG_SHOW_HUD_WEAPONINFO);
|
||||
}
|
||||
else if (flags & CG_SHOW_ANYTEAMGAME)
|
||||
|
|
|
@ -1,119 +0,0 @@
|
|||
#include "cg_local.h"
|
||||
#include "animtable.h"
|
||||
|
||||
|
||||
/*
|
||||
======================
|
||||
CG_ParseAnimationFile
|
||||
|
||||
Read a configuration file containing animation counts and rates
|
||||
models/players/visor/animation.cfg, etc
|
||||
======================
|
||||
*/
|
||||
qboolean CG_ParseAnimationFile ( const char *filename, clientInfo_t *ci)
|
||||
{
|
||||
const char *text_p;
|
||||
int len;
|
||||
int i;
|
||||
char *token;
|
||||
float fps;
|
||||
int skip;
|
||||
char text[20000];
|
||||
fileHandle_t f;
|
||||
int animNum;
|
||||
animation_t *animations;
|
||||
|
||||
animations = ci->animations;
|
||||
|
||||
// load the file
|
||||
len = trap_FS_FOpenFile( filename, &f, FS_READ );
|
||||
if ( len <= 0 || len >= sizeof( text ) - 1 )
|
||||
{
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
trap_FS_Read( text, len, f );
|
||||
text[len] = 0;
|
||||
trap_FS_FCloseFile( f );
|
||||
|
||||
// parse the text
|
||||
text_p = text;
|
||||
skip = 0; // quiet the compiler warning
|
||||
|
||||
//FIXME: have some way of playing anims backwards... negative numFrames?
|
||||
|
||||
//initialize anim array so that from 0 to MAX_ANIMATIONS, set default values of 0 1 0 100
|
||||
for(i = 0; i < MAX_ANIMATIONS; i++)
|
||||
{
|
||||
animations[i].firstFrame = 0;
|
||||
animations[i].numFrames = 0;
|
||||
animations[i].loopFrames = -1;
|
||||
animations[i].frameLerp = 100;
|
||||
animations[i].initialLerp = 100;
|
||||
}
|
||||
|
||||
// read information for each frame
|
||||
while(1)
|
||||
{
|
||||
token = COM_Parse( &text_p );
|
||||
|
||||
if ( !token || !token[0])
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
animNum = GetIDForString(animTable, token);
|
||||
if(animNum == -1)
|
||||
{
|
||||
//#ifndef FINAL_BUILD
|
||||
#ifdef _DEBUG
|
||||
Com_Printf(S_COLOR_RED"WARNING: Unknown token %s in %s\n", token, filename);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
token = COM_Parse( &text_p );
|
||||
if ( !token )
|
||||
{
|
||||
break;
|
||||
}
|
||||
animations[animNum].firstFrame = atoi( token );
|
||||
|
||||
token = COM_Parse( &text_p );
|
||||
if ( !token )
|
||||
{
|
||||
break;
|
||||
}
|
||||
animations[animNum].numFrames = atoi( token );
|
||||
|
||||
token = COM_Parse( &text_p );
|
||||
if ( !token )
|
||||
{
|
||||
break;
|
||||
}
|
||||
animations[animNum].loopFrames = atoi( token );
|
||||
|
||||
token = COM_Parse( &text_p );
|
||||
if ( !token )
|
||||
{
|
||||
break;
|
||||
}
|
||||
fps = atof( token );
|
||||
if ( fps == 0 )
|
||||
{
|
||||
fps = 1;//Don't allow divide by zero error
|
||||
}
|
||||
if ( fps < 0 )
|
||||
{//backwards
|
||||
animations[animNum].frameLerp = floor(1000.0f / fps);
|
||||
}
|
||||
else
|
||||
{
|
||||
animations[animNum].frameLerp = ceil(1000.0f / fps);
|
||||
}
|
||||
|
||||
animations[animNum].initialLerp = ceil(1000.0f / fabs(fps));
|
||||
}
|
||||
|
||||
return qtrue;
|
||||
}
|
|
@ -284,32 +284,22 @@ static void CG_SetDeferredClientInfo( clientInfo_t *ci )
|
|||
int i;
|
||||
clientInfo_t *match;
|
||||
|
||||
/*
|
||||
// If someone else is already the same models and skins we
|
||||
// can just load the client info
|
||||
// spectators can use any skin
|
||||
if ( ci->team == TEAM_SPECTATOR )
|
||||
{
|
||||
for ( i = 0; i < cgs.maxclients; i ++ )
|
||||
{
|
||||
match = &cgs.clientinfo[ i ];
|
||||
|
||||
// Cant steal the model from invalid or deferred clients
|
||||
if ( !match->infoValid || match->deferred )
|
||||
if ( !match->infoValid )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// If the model, skin, and team match then we have a match
|
||||
if ( Q_stricmp( ci->identityName, match->identityName) ||
|
||||
(ci->team != match->team) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// just load the real info cause it uses the same models and skins
|
||||
CG_LoadClientInfo( ci );
|
||||
|
||||
ci->deferred = qtrue;
|
||||
CG_CopyClientInfoModel( match, ci );
|
||||
return;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// Try to use any skin from the team they are joining
|
||||
if ( cgs.gametypeData->teams )
|
||||
|
@ -588,6 +578,7 @@ static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader )
|
|||
{
|
||||
int rf;
|
||||
refEntity_t ent;
|
||||
clientInfo_t *ci = &cgs.clientinfo[cent->currentState.clientNum];
|
||||
|
||||
if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson )
|
||||
{
|
||||
|
@ -600,8 +591,6 @@ static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader )
|
|||
}
|
||||
|
||||
memset( &ent, 0, sizeof( ent ) );
|
||||
VectorCopy( cent->lerpOrigin, ent.origin );
|
||||
ent.origin[2] += 58;
|
||||
ent.reType = RT_SPRITE;
|
||||
ent.customShader = shader;
|
||||
ent.radius = 10;
|
||||
|
@ -610,6 +599,20 @@ static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader )
|
|||
ent.shaderRGBA[1] = 255;
|
||||
ent.shaderRGBA[2] = 255;
|
||||
ent.shaderRGBA[3] = 255;
|
||||
|
||||
if ( ci->boltNightvision == -1 )
|
||||
{
|
||||
ci->boltNightvision = trap_G2API_AddBolt( cent->ghoul2, 0, "*head_t" );
|
||||
}
|
||||
|
||||
// Fall back to make sure its correct
|
||||
if ( !G2_PositionEntityOnBolt ( &ent, cent->ghoul2, 0, ci->boltNightvision, cent->lerpOrigin, cent->pe.ghoulLegsAngles, cent->modelScale ) )
|
||||
{
|
||||
ci->boltNightvision = -1;
|
||||
}
|
||||
|
||||
ent.origin[2] += 15;
|
||||
|
||||
trap_R_AddRefEntityToScene( &ent );
|
||||
}
|
||||
|
||||
|
@ -871,21 +874,12 @@ static void CG_UpdatePlayerAnimations ( centity_t* cent )
|
|||
CG_PlayerGametypeItems
|
||||
===============
|
||||
*/
|
||||
void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles )
|
||||
void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles, int rf )
|
||||
{
|
||||
clientInfo_t *ci = &cgs.clientinfo[cent->currentState.clientNum];
|
||||
int i;
|
||||
int rf;
|
||||
|
||||
if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson )
|
||||
{
|
||||
// only show in mirrors
|
||||
rf = RF_THIRD_PERSON;
|
||||
}
|
||||
else
|
||||
{
|
||||
rf = 0;
|
||||
}
|
||||
rf = rf & RF_THIRD_PERSON;
|
||||
|
||||
// If the player is wearing goggles then draw them on their head
|
||||
if ( cent->currentState.eFlags & EF_GOGGLES )
|
||||
|
@ -934,7 +928,10 @@ void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles )
|
|||
memset ( &item, 0, sizeof(item) );
|
||||
item.renderfx = rf | RF_MINLIGHT;
|
||||
item.ghoul2 = cg_items[ MODELINDEX_GAMETYPE_ITEM + i ].boltModel;
|
||||
G2_PositionEntityOnBolt ( &item, cent->ghoul2, 0, ci->boltGametypeItems[i], cent->lerpOrigin, angles, cent->modelScale );
|
||||
if ( !G2_PositionEntityOnBolt ( &item, cent->ghoul2, 0, ci->boltGametypeItems[i], cent->lerpOrigin, angles, cent->modelScale ) )
|
||||
{
|
||||
ci->boltGametypeItems[i] = -1;
|
||||
}
|
||||
trap_R_AddRefEntityToScene(&item);
|
||||
}
|
||||
}
|
||||
|
@ -948,28 +945,54 @@ CG_UpdatePlayerWeaponModel
|
|||
void CG_UpdatePlayerWeaponModel ( centity_t* cent, qboolean force )
|
||||
{
|
||||
clientInfo_t *ci = &cgs.clientinfo[cent->currentState.clientNum];
|
||||
void *model;
|
||||
|
||||
model = NULL;
|
||||
if ( (cent->pe.torso.anim&~ANIM_TOGGLEBIT) == TORSO_USE )
|
||||
{
|
||||
int item;
|
||||
|
||||
cent->pe.weapon = -1;
|
||||
|
||||
for ( item = 0; item < MAX_GAMETYPE_ITEMS; item ++ )
|
||||
{
|
||||
if ( cent->currentState.gametypeitems & (1<<item) )
|
||||
{
|
||||
model = cg_items[MODELINDEX_GAMETYPE_ITEM+item].useModel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// If the weapon model hasnt changed then dont update it
|
||||
if ( !force && cent->currentState.weapon == cent->pe.weapon )
|
||||
else if ( !force && cent->currentState.weapon == cent->pe.weapon )
|
||||
{
|
||||
if ( -1 != trap_G2API_GetBoltIndex ( cent->ghoul2, cent->pe.weaponModelSpot ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// Ensure the weapon is registered
|
||||
CG_RegisterWeapon ( cent->currentState.weapon );
|
||||
|
||||
// If we have a ghoul model then we can attach it to the right hand of the player model
|
||||
if (cg_weapons[cent->currentState.weapon].weaponG2Model)
|
||||
{
|
||||
if ( cent->pe.weaponModelSpot )
|
||||
model = cg_weapons[cent->currentState.weapon].weaponG2Model;
|
||||
|
||||
cent->pe.weapon = cent->currentState.weapon;
|
||||
}
|
||||
|
||||
// Get rid of whats in their hand
|
||||
if ( cent->pe.weaponModelSpot && cent->pe.weaponModelSpot != -1 )
|
||||
{
|
||||
trap_G2API_DetachG2Model ( cent->ghoul2, cent->pe.weaponModelSpot );
|
||||
trap_G2API_RemoveGhoul2Model( ¢->ghoul2, cent->pe.weaponModelSpot );
|
||||
cent->pe.weaponModelSpot = 0;
|
||||
}
|
||||
|
||||
cent->pe.weaponModelSpot = trap_G2API_CopySpecificGhoul2Model(cg_weapons[cent->currentState.weapon].weaponG2Model, 0, cent->ghoul2, -1 );
|
||||
// trap_G2API_CopySpecificGhoul2Model(cg_weapons[cent->currentState.weapon].weaponG2Model, 0, cent->ghoul2, cent->pe.weaponModelSpot );
|
||||
// If we have a ghoul model then we can attach it to the right hand of the player model
|
||||
if (model)
|
||||
{
|
||||
cent->pe.weaponModelSpot = trap_G2API_CopySpecificGhoul2Model(model, 0, cent->ghoul2, -1 );
|
||||
trap_G2API_SetBoltInfo(cent->ghoul2, cent->pe.weaponModelSpot, ci->boltWorldWeapon );
|
||||
trap_G2API_AttachG2Model(cent->ghoul2, cent->pe.weaponModelSpot, cent->ghoul2, ci->boltWorldWeapon, 0);
|
||||
|
||||
|
@ -985,9 +1008,6 @@ void CG_UpdatePlayerWeaponModel ( centity_t* cent, qboolean force )
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Update the weapon in the player entity
|
||||
cent->pe.weapon = cent->currentState.weapon;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1201,7 +1221,7 @@ void CG_Player( centity_t *cent )
|
|||
// Render any of the floating sprites above the players head
|
||||
CG_PlayerSprites ( cent );
|
||||
|
||||
CG_PlayerGametypeItems ( cent, cent->pe.ghoulLegsAngles );
|
||||
CG_PlayerGametypeItems ( cent, cent->pe.ghoulLegsAngles, renderfx );
|
||||
|
||||
VectorCopy ( save, cent->lerpOrigin );
|
||||
}
|
||||
|
@ -1215,6 +1235,11 @@ A player just came into view or teleported, so reset all animation info
|
|||
*/
|
||||
void CG_ResetPlayerEntity( centity_t *cent )
|
||||
{
|
||||
clientInfo_t *ci;
|
||||
int i;
|
||||
|
||||
ci = &cgs.clientinfo[cent->currentState.clientNum];
|
||||
|
||||
cent->errorTime = -99999; // guarantee no error decay added
|
||||
cent->extrapolated = qfalse;
|
||||
|
||||
|
@ -1226,6 +1251,7 @@ void CG_ResetPlayerEntity( centity_t *cent )
|
|||
|
||||
cent->pe.legs.anim = -1;
|
||||
cent->pe.torso.anim = -1;
|
||||
cent->pe.weapon = -1;
|
||||
|
||||
memset( ¢->pe.legs, 0, sizeof( cent->pe.legs ) );
|
||||
cent->pe.legs.yawAngle = cent->rawAngles[YAW];
|
||||
|
@ -1238,6 +1264,12 @@ void CG_ResetPlayerEntity( centity_t *cent )
|
|||
cent->pe.torso.yawing = qfalse;
|
||||
cent->pe.torso.pitchAngle = cent->rawAngles[PITCH];
|
||||
cent->pe.torso.pitching = qfalse;
|
||||
|
||||
// Reset all bolt position
|
||||
for ( i = 0; i < MAX_GAMETYPE_ITEMS; i ++ )
|
||||
{
|
||||
ci->boltGametypeItems[i] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -226,7 +226,7 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops )
|
|||
}
|
||||
|
||||
// Look for a zoom transition that isnt the first zoom in
|
||||
if ( ops->zoomFov && (ps->zoomFov != ops->zoomFov) )
|
||||
if ( weaponData[ops->weapon].zoom[ops->zoomFov].fov && (weaponData[ps->weapon].zoom[ps->zoomFov].fov != weaponData[ops->weapon].zoom[ops->zoomFov].fov) )
|
||||
{
|
||||
trap_S_StartLocalSound ( cgs.media.zoomSound, CHAN_AUTO );
|
||||
}
|
||||
|
@ -252,6 +252,9 @@ void CG_TransitionPlayerState( playerState_t *ps, playerState_t *ops )
|
|||
cg.thisFrameTeleport = qtrue;
|
||||
// make sure we don't get any unwanted transition effects
|
||||
*ops = *ps;
|
||||
|
||||
CG_SetWeaponAnim(ps->weaponAnimId&(~ANIM_TOGGLEBIT),ps);
|
||||
CG_UpdateViewWeaponSurfaces ( ps );
|
||||
}
|
||||
|
||||
// damage events (player is getting wounded)
|
||||
|
|
|
@ -369,6 +369,7 @@ static void CG_TouchItem( centity_t *cent )
|
|||
{
|
||||
gitem_t *item;
|
||||
qboolean autoswitch = qfalse;
|
||||
int eventID;
|
||||
|
||||
if ( !cg_predictItems.integer )
|
||||
{
|
||||
|
@ -413,8 +414,17 @@ static void CG_TouchItem( centity_t *cent )
|
|||
}
|
||||
}
|
||||
|
||||
if ( cg.predictedPlayerState.pm_flags & PMF_DUCKED )
|
||||
{
|
||||
eventID = EV_ITEM_PICKUP_QUIET;
|
||||
}
|
||||
else
|
||||
{
|
||||
eventID = EV_ITEM_PICKUP;
|
||||
}
|
||||
|
||||
// grab it
|
||||
BG_AddPredictableEventToPlayerstate( EV_ITEM_PICKUP, cent->currentState.modelindex|(autoswitch?ITEM_AUTOSWITCHBIT:0) , &cg.predictedPlayerState);
|
||||
BG_AddPredictableEventToPlayerstate( eventID, cent->currentState.modelindex|(autoswitch?ITEM_AUTOSWITCHBIT:0) , &cg.predictedPlayerState);
|
||||
|
||||
// remove it from the frame so it won't be drawn
|
||||
cent->currentState.eFlags |= EF_NODRAW;
|
||||
|
|
|
@ -344,6 +344,11 @@ typedef enum
|
|||
|
||||
CG_MAP_CHANGE,
|
||||
|
||||
CG_VOICE_EVENT,
|
||||
|
||||
CG_GET_TEAM_COUNT,
|
||||
CG_GET_TEAM_SCORE,
|
||||
|
||||
} cgameExport_t;
|
||||
|
||||
// CG_POINT_CONTENTS
|
||||
|
|
|
@ -90,6 +90,7 @@ void CG_ParseServerinfo( void )
|
|||
cgs.timelimit = atoi( Info_ValueForKey( info, "timelimit" ) );
|
||||
cgs.maxclients = atoi( Info_ValueForKey( info, "sv_maxclients" ) );
|
||||
cgs.friendlyFire = atoi( Info_ValueForKey( info, "g_friendlyFire" ) ) ? qtrue : qfalse;
|
||||
cgs.punkbuster = atoi( Info_ValueForKey( info, "sv_punkbster" ) ) ? qtrue : qfalse;
|
||||
mapname = Info_ValueForKey( info, "mapname" );
|
||||
Com_sprintf( cgs.mapname, sizeof( cgs.mapname ), "maps/%s.bsp", mapname );
|
||||
|
||||
|
@ -97,6 +98,7 @@ void CG_ParseServerinfo( void )
|
|||
trap_Cvar_Set ( "ui_about_gametypename", cgs.gametypeData->displayName );
|
||||
trap_Cvar_Set ( "ui_about_scorelimit", va("%i", cgs.scorelimit ) );
|
||||
trap_Cvar_Set ( "ui_about_timelimit", va("%i", cgs.timelimit ) );
|
||||
trap_Cvar_Set ( "ui_about_friendlyfire", va("%i", cgs.friendlyFire) );
|
||||
trap_Cvar_Set ( "ui_about_maxclients", va("%i", cgs.maxclients ) );
|
||||
trap_Cvar_Set ( "ui_about_dmflags", va("%i", cgs.dmflags ) );
|
||||
trap_Cvar_Set ( "ui_about_mapname", mapname );
|
||||
|
@ -217,6 +219,8 @@ Called on load to set the initial values from configure strings
|
|||
*/
|
||||
void CG_SetConfigValues( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
cgs.levelStartTime = atoi( CG_ConfigString( CS_LEVEL_START_TIME ) );
|
||||
cg.warmup = atoi( CG_ConfigString( CS_WARMUP ) );
|
||||
cgs.pickupsDisabled = atoi( CG_ConfigString( CS_PICKUPSDISABLED ) );
|
||||
|
@ -227,6 +231,11 @@ void CG_SetConfigValues( void )
|
|||
CG_ParseGametypeTimer ( );
|
||||
CG_ParseGametypeMessage ( );
|
||||
CG_ParseVoteTime ( );
|
||||
|
||||
for ( i = 0; i < MAX_HUDICONS; i ++ )
|
||||
{
|
||||
cgs.hudIcons[i] = atoi ( CG_ConfigString ( CS_HUDICONS + i ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -369,6 +378,10 @@ static void CG_ConfigStringModified( void )
|
|||
{
|
||||
cgs.gameIcons[ num - CS_ICONS ] = trap_R_RegisterShaderNoMip ( str );
|
||||
}
|
||||
else if ( num >= CS_HUDICONS && num < CS_HUDICONS + MAX_HUDICONS )
|
||||
{
|
||||
cgs.hudIcons[ num - CS_HUDICONS ] = atoi ( str );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -669,8 +682,6 @@ void CG_LoadVoiceChats( void )
|
|||
size = trap_MemoryRemaining();
|
||||
CG_ParseVoiceChats( "scripts/female1.voice", &voiceChatLists[0], MAX_VOICECHATS );
|
||||
CG_ParseVoiceChats( "scripts/male1.voice", &voiceChatLists[1], MAX_VOICECHATS );
|
||||
|
||||
Com_Printf("voice chat memory size = %d\n", size - trap_MemoryRemaining());
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -27,8 +27,6 @@ static void CG_ResetEntity( centity_t *cent )
|
|||
{
|
||||
CG_ResetPlayerEntity( cent );
|
||||
}
|
||||
|
||||
cent->pe.weapon = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -588,7 +588,6 @@ static void CG_OffsetFirstPersonView( void )
|
|||
float f;
|
||||
vec3_t predictedVelocity;
|
||||
int timeDelta;
|
||||
vec3_t right;
|
||||
|
||||
if ( cg.snap->ps.pm_type == PM_INTERMISSION ) {
|
||||
return;
|
||||
|
@ -732,8 +731,8 @@ static void CG_OffsetFirstPersonView( void )
|
|||
|
||||
leanOffset = (float)(cg.predictedPlayerState.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET;
|
||||
angles[ROLL] += leanOffset / 4;
|
||||
AngleVectors( cg.predictedPlayerState.viewangles, NULL, right, NULL );
|
||||
VectorMA( origin, leanOffset, right, origin );
|
||||
|
||||
BG_ApplyLeanOffset ( &cg.predictedPlayerState, origin );
|
||||
}
|
||||
|
||||
// Make sure view doesnt invert on itself
|
||||
|
@ -856,7 +855,7 @@ static int CG_CalcFov( void ) {
|
|||
|
||||
if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED )
|
||||
{
|
||||
zoomFov = (float)cg.predictedPlayerState.zoomFov;
|
||||
zoomFov = (float)weaponData[cg.predictedPlayerState.weapon].zoom[cg.predictedPlayerState.zoomFov].fov;
|
||||
|
||||
if (!cg.predictedPlayerState.pm_flags & PMF_ZOOM_LOCKED )
|
||||
{
|
||||
|
@ -885,6 +884,8 @@ static int CG_CalcFov( void ) {
|
|||
}
|
||||
else
|
||||
{
|
||||
zoomFov = (float)weaponData[cg.predictedPlayerState.weapon].zoom[cg.predictedPlayerState.zoomFov].fov;
|
||||
|
||||
f = ( cg.time - cg.predictedPlayerState.zoomTime ) / ZOOM_OUT_TIME;
|
||||
if ( f > 1.0 )
|
||||
{
|
||||
|
@ -892,7 +893,7 @@ static int CG_CalcFov( void ) {
|
|||
}
|
||||
else
|
||||
{
|
||||
fov_x = cg.predictedPlayerState.zoomFov + f * ( fov_x - cg.predictedPlayerState.zoomFov );
|
||||
fov_x = zoomFov + f * ( fov_x - zoomFov );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1284,9 +1285,16 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demo
|
|||
cg.renderingThirdPerson = qfalse;
|
||||
}
|
||||
else if ( cg.snap->ps.pm_flags & PMF_FOLLOW )
|
||||
{
|
||||
if ( cg.snap->ps.pm_flags & PMF_FOLLOWFIRST )
|
||||
{
|
||||
cg.renderingThirdPerson = qfalse;
|
||||
}
|
||||
else
|
||||
{
|
||||
cg.renderingThirdPerson = qtrue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cg.renderingThirdPerson = cg_thirdPerson.integer || (cg.snap->ps.stats[STAT_HEALTH] <= 0);
|
||||
|
@ -1305,6 +1313,7 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demo
|
|||
if ( cg.deferredPlayerLoading > 10 )
|
||||
{
|
||||
CG_LoadDeferredPlayers();
|
||||
cg.deferredPlayerLoading = 0;
|
||||
}
|
||||
|
||||
// build the render lists
|
||||
|
|
|
@ -224,7 +224,7 @@ void CG_PlayerWeaponEffects ( refEntity_t *parent, centity_t *cent, int team, ve
|
|||
}
|
||||
|
||||
// Add a dlight to the scene if it has a muzzle effect
|
||||
if ( attackInfo->muzzleEffect )
|
||||
if ( attackInfo->muzzleEffect && weaponNum != WP_MP5 )
|
||||
{
|
||||
trap_R_AddLightToScene( flash.origin, 200, 0.6f, 0.4f, 0.2f );
|
||||
}
|
||||
|
@ -382,6 +382,7 @@ void CG_UpdateViewWeaponSurfaces ( playerState_t* ps )
|
|||
break;
|
||||
|
||||
case WP_M1911A1_PISTOL:
|
||||
case WP_SILVER_TALON:
|
||||
case WP_USSOCOM_PISTOL:
|
||||
{
|
||||
int forward;
|
||||
|
@ -503,6 +504,12 @@ void CG_AddViewWeapon(playerState_t *ps)
|
|||
|
||||
VectorCopy ( cg.refdef.vieworg, gun.origin );
|
||||
|
||||
if ( cg.predictedPlayerState.stats[STAT_USEWEAPONDROP] )
|
||||
{
|
||||
VectorMA ( gun.origin, (-20.0f * (float)cg.predictedPlayerState.stats[STAT_USEWEAPONDROP]/300.0f), cg.refdef.viewaxis[0], gun.origin );
|
||||
VectorMA ( gun.origin, (-20.0f * (float)cg.predictedPlayerState.stats[STAT_USEWEAPONDROP]/300.0f), cg.refdef.viewaxis[2], gun.origin );
|
||||
}
|
||||
|
||||
// Add movement bobbing
|
||||
gun.origin[2] += cg.xyspeed * cg.bobfracsin * 0.0015f;
|
||||
|
||||
|
@ -650,7 +657,7 @@ void CG_AddViewWeapon(playerState_t *ps)
|
|||
}
|
||||
|
||||
// Add a dlight when there is a muzzle effect
|
||||
if ( attackInfo->muzzleEffect )
|
||||
if ( attackInfo->muzzleEffect && ps->weapon != WP_MP5 )
|
||||
{
|
||||
trap_R_AddLightToScene( flash.origin, 200, 0.6f, 0.4f, 0.2f );
|
||||
}
|
||||
|
@ -723,6 +730,11 @@ void CG_NextWeapon ( qboolean allowEmpty, int exclude )
|
|||
return;
|
||||
}
|
||||
|
||||
if ( cg.predictedPlayerState.stats[STAT_USEWEAPONDROP] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( cg.snap->ps.pm_flags & PMF_FOLLOW )
|
||||
{
|
||||
return;
|
||||
|
@ -793,6 +805,11 @@ void CG_PrevWeapon ( qboolean allowEmpty, int exclude )
|
|||
return;
|
||||
}
|
||||
|
||||
if ( cg.predictedPlayerState.stats[STAT_USEWEAPONDROP] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( cg.snap->ps.pm_flags & PMF_FOLLOW )
|
||||
{
|
||||
return;
|
||||
|
@ -861,6 +878,11 @@ void CG_Weapon_f( void )
|
|||
return;
|
||||
}
|
||||
|
||||
if ( cg.predictedPlayerState.stats[STAT_USEWEAPONDROP] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( (cg.snap->ps.pm_flags & PMF_FOLLOW) )
|
||||
{
|
||||
return;
|
||||
|
@ -951,7 +973,7 @@ The current weapon has just run out of ammo
|
|||
void CG_OutOfAmmoChange( int weapon )
|
||||
{
|
||||
// Get the best weapon thats not a grenade
|
||||
cg.weaponSelect = WP_M67_GRENADE;
|
||||
cg.weaponSelect = WP_M84_GRENADE;
|
||||
CG_PrevWeapon ( qfalse, weapon );
|
||||
}
|
||||
|
||||
|
@ -979,7 +1001,7 @@ void CG_PredictedBullet ( centity_t* cent, attackType_t attack )
|
|||
ent = ¢->currentState;
|
||||
|
||||
// Dont bother if antilag is turned off or its a projectile weapon
|
||||
if ( cg_antiLag.integer < 1 || !cg_impactPrediction.integer || (weaponData[ent->weapon].attack[attack].weaponFlags & PROJECTILE_FIRE))
|
||||
if ( cg_antiLag.integer < 1 || cg_synchronousClients.integer || !cg_impactPrediction.integer || (weaponData[ent->weapon].attack[attack].weaponFlags & PROJECTILE_FIRE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -998,12 +1020,7 @@ void CG_PredictedBullet ( centity_t* cent, attackType_t attack )
|
|||
VectorCopy(cg.predictedPlayerState.viewangles, fireAngs);
|
||||
if ( cg.predictedPlayerState.pm_flags & PMF_LEANING )
|
||||
{
|
||||
vec3_t right;
|
||||
float leanOffset;
|
||||
|
||||
leanOffset = (float)(cg.predictedPlayerState.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET;
|
||||
AngleVectors( fireAngs, NULL, right, NULL );
|
||||
VectorMA( start, leanOffset, right, start );
|
||||
BG_ApplyLeanOffset ( &cg.predictedPlayerState, start );
|
||||
}
|
||||
|
||||
seed = cg.predictedPlayerState.stats[STAT_SEED];
|
||||
|
@ -1131,12 +1148,19 @@ void CG_FireWeapon( centity_t *cent, attackType_t attack )
|
|||
c = rand() % c;
|
||||
if ( attackInfo->flashSound[c] )
|
||||
{
|
||||
trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, attackInfo->flashSound[c], -1, 2000 );
|
||||
int radius = 2000;
|
||||
|
||||
if ( ent->weapon == WP_MP5 && cent->currentState.number != cg.snap->ps.clientNum)
|
||||
{
|
||||
radius = 1250;
|
||||
}
|
||||
|
||||
trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, attackInfo->flashSound[c], -1, radius );
|
||||
}
|
||||
}
|
||||
|
||||
// Handle dissapearing bullets if this is the main guy firing
|
||||
if ( cent->currentState.number == cg.snap->ps.clientNum )
|
||||
if ( cent->currentState.number == cg.snap->ps.clientNum && cg.hitModel )
|
||||
{
|
||||
CG_PredictedBullet ( cent, attack );
|
||||
}
|
||||
|
@ -1329,12 +1353,8 @@ void CG_MissileHitWall (
|
|||
|
||||
case AMMO_40:
|
||||
case AMMO_M15:
|
||||
case AMMO_M67:
|
||||
case AMMO_M84:
|
||||
case AMMO_F1:
|
||||
case AMMO_RPG7:
|
||||
case AMMO_L2A2:
|
||||
case AMMO_MDN11:
|
||||
case AMMO_SMOHG92:
|
||||
case AMMO_ANM14:
|
||||
|
||||
|
@ -1403,11 +1423,7 @@ void CG_MissileHitPlayer (
|
|||
case AMMO_RPG7:
|
||||
case AMMO_40:
|
||||
case AMMO_M15:
|
||||
case AMMO_M67:
|
||||
case AMMO_M84:
|
||||
case AMMO_F1:
|
||||
case AMMO_L2A2:
|
||||
case AMMO_MDN11:
|
||||
case AMMO_SMOHG92:
|
||||
case AMMO_ANM14:
|
||||
if (cg_lockBlood.integer)
|
||||
|
@ -1521,9 +1537,15 @@ void CG_Tracer(int tracerEffectID, vec3_t source, vec3_t dest )
|
|||
{
|
||||
vec3_t forward;
|
||||
float len;
|
||||
float chance;
|
||||
|
||||
if ( !tracerEffectID )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Lower the amount of tracers
|
||||
float chance = cg_tracerChance.value * 100.0f;
|
||||
chance = cg_tracerChance.value * 100.0f;
|
||||
if ( rand()%100 > chance )
|
||||
{
|
||||
return;
|
||||
|
@ -1591,6 +1613,7 @@ void CG_Bullet(
|
|||
// Tracers on enemies only
|
||||
if ( sourceEntityNum != cg.snap->ps.clientNum || cg.renderingThirdPerson )
|
||||
{
|
||||
// MP5's have no tracers
|
||||
CG_Tracer(tracerEffectID, start, end );
|
||||
}
|
||||
}
|
||||
|
@ -1751,7 +1774,7 @@ void CG_WeaponCallback ( playerState_t* ps, centity_t* cent, int weapon, int ani
|
|||
{
|
||||
// Play sound.
|
||||
// FIXME: randomly select sound??
|
||||
trap_S_StartSound(NULL,ent->number,CHAN_WEAPON,weaponInfo->otherWeaponSounds[i][0], -1, -1);
|
||||
trap_S_StartSound(NULL,ent->number,CHAN_AUTO,weaponInfo->otherWeaponSounds[i][0], -1, -1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=SoF2cgame - Win32 SH Debug SoF2
|
||||
CFG=SoF2cgame - Win32 Release SoF2
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
|
@ -13,19 +13,16 @@ CFG=SoF2cgame - Win32 SH Debug SoF2
|
|||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "sof2_cgame.mak" CFG="SoF2cgame - Win32 SH Debug SoF2"
|
||||
!MESSAGE NMAKE /f "sof2_cgame.mak" CFG="SoF2cgame - Win32 Release SoF2"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "SoF2cgame - Win32 Release SoF2" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "SoF2cgame - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "SoF2cgame - Win32 SH Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
@ -88,562 +85,152 @@ LINK32=link.exe
|
|||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x30000000" /subsystem:windows /dll /map:"..\Debug\sof2mp_cgamex86.map" /debug /machine:I386 /def:".\SoF2_cgame.def" /out:"..\Debug\sof2mp_cgamex86.dll"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "SoF2cgame___Win32_SH_Debug_SoF2"
|
||||
# PROP BASE Intermediate_Dir "SoF2cgame___Win32_SH_Debug_SoF2"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "SoF2cgame___Win32_SH_Debug_SoF2"
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /G5 /MTd /W4 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "_SOF2" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /G5 /MTd /W4 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "_SOF2" /D "MEM_DEBUG" /D "CGAME" /FR /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "_Debug SoF2" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "_Debug SoF2" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_Debug SoF2"
|
||||
# ADD RSC /l 0x409 /d "_Debug SoF2"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map:"..\Debug\sof2mp_cgamex86.map" /debug /machine:I386 /def:".\SoF2_cgame.def" /out:"..\Debug\sof2mp_cgamex86.dll"
|
||||
# SUBTRACT BASE LINK32 /pdb:none
|
||||
# ADD LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /pdb:"..\SHDebug/sof2mp_cgamex86.pdb" /map:"..\SHDebug\sof2mp_cgamex86.map" /debug /machine:I386 /def:".\SoF2_cgame.def" /out:"..\SHDebug\sof2mp_cgamex86.dll"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "SoF2cgame - Win32 Release SoF2"
|
||||
# Name "SoF2cgame - Win32 Debug SoF2"
|
||||
# Name "SoF2cgame - Win32 SH Debug SoF2"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "c"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\game\bg_gametype.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\game\bg_lib.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
# PROP BASE Exclude_From_Build 1
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
# PROP BASE Exclude_From_Build 1
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP BASE Exclude_From_Build 1
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\game\bg_misc.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\game\bg_player.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\game\bg_pmove.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\game\bg_slidemove.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\game\bg_weapons.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_consolecmds.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_draw.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_drawtools.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_effects.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_ents.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_event.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_gametype.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_gore.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_info.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_light.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_localents.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_main.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_miscents.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_newDraw.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_players.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_playerstate.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_predict.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_scoreboard.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_servercmds.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_snapshot.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_syscalls.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_view.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_weaponinit.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_weapons.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\game\q_math.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\game\q_shared.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\ui\ui_shared.c
|
||||
|
||||
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
@ -679,10 +266,18 @@ SOURCE=.\cg_public.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_was.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qcommon\disablewarnings.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\fx_local.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\ghoul2\G2.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -748,11 +343,6 @@ SOURCE=.\SoF2_cgame.def
|
|||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
|
||||
|
||||
# PROP BASE Exclude_From_Build 1
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
|
|
|
@ -726,6 +726,7 @@ int BotAISetupClient(int client, struct bot_settings_s *settings, qboolean resta
|
|||
bs->botWeaponWeights[WP_NONE] = 0;
|
||||
bs->botWeaponWeights[WP_KNIFE] = 1;
|
||||
bs->botWeaponWeights[WP_M1911A1_PISTOL] = 3;
|
||||
bs->botWeaponWeights[WP_SILVER_TALON] = 4;
|
||||
bs->botWeaponWeights[WP_USSOCOM_PISTOL] = 2;
|
||||
bs->botWeaponWeights[WP_M4_ASSAULT_RIFLE] = 10;
|
||||
bs->botWeaponWeights[WP_AK74_ASSAULT_RIFLE] = 9;
|
||||
|
@ -737,14 +738,12 @@ int BotAISetupClient(int client, struct bot_settings_s *settings, qboolean resta
|
|||
bs->botWeaponWeights[WP_M590_SHOTGUN] = 13;
|
||||
bs->botWeaponWeights[WP_MM1_GRENADE_LAUNCHER] = 8;
|
||||
bs->botWeaponWeights[WP_RPG7_LAUNCHER] = 16;
|
||||
bs->botWeaponWeights[WP_M67_GRENADE] = 6;
|
||||
bs->botWeaponWeights[WP_M84_GRENADE] = 6;
|
||||
bs->botWeaponWeights[WP_F1_GRENADE] = 6;
|
||||
bs->botWeaponWeights[WP_L2A2_GRENADE] = 5;
|
||||
bs->botWeaponWeights[WP_MDN11_GRENADE] = 5;
|
||||
bs->botWeaponWeights[WP_SMOHG92_GRENADE] = 2;
|
||||
bs->botWeaponWeights[WP_ANM14_GRENADE] = 2;
|
||||
bs->botWeaponWeights[WP_M15_GRENADE] = 2;
|
||||
bs->botWeaponWeights[WP_MP5] = 7;
|
||||
bs->botWeaponWeights[WP_SIG551] = 7;
|
||||
|
||||
BotUtilizePersonality(bs);
|
||||
|
||||
|
@ -3492,12 +3491,15 @@ float BotWeaponCanLead(bot_state_t *bs)
|
|||
|
||||
// no leading needed for any bullet weapons
|
||||
case WP_M1911A1_PISTOL:
|
||||
case WP_SILVER_TALON:
|
||||
case WP_USSOCOM_PISTOL:
|
||||
case WP_M4_ASSAULT_RIFLE:
|
||||
case WP_AK74_ASSAULT_RIFLE:
|
||||
case WP_M60_MACHINEGUN:
|
||||
case WP_MICRO_UZI_SUBMACHINEGUN:
|
||||
case WP_M3A1_SUBMACHINEGUN:
|
||||
case WP_MP5:
|
||||
case WP_SIG551:
|
||||
case WP_MSG90A1:
|
||||
case WP_USAS_12_SHOTGUN:
|
||||
case WP_M590_SHOTGUN:
|
||||
|
@ -3507,11 +3509,7 @@ float BotWeaponCanLead(bot_state_t *bs)
|
|||
return 0.5;
|
||||
case WP_RPG7_LAUNCHER:
|
||||
return 0.5;
|
||||
case WP_M67_GRENADE:
|
||||
case WP_M84_GRENADE:
|
||||
case WP_F1_GRENADE:
|
||||
case WP_L2A2_GRENADE:
|
||||
case WP_MDN11_GRENADE:
|
||||
case WP_SMOHG92_GRENADE:
|
||||
case WP_ANM14_GRENADE:
|
||||
case WP_M15_GRENADE:
|
||||
|
|
|
@ -1345,16 +1345,15 @@ float botGlobalNavWeaponWeights[WP_NUM_WEAPONS] =
|
|||
9,//WP_M60_MACHINEGUN,
|
||||
7,//WP_MM1_GRENADE_LAUNCHER,
|
||||
7,//WP_RPG7_LAUNCHER,
|
||||
7,//WP_M67_GRENADE,
|
||||
|
||||
6,//WP_M84_GRENADE,
|
||||
6,//WP_F1_GRENADE,
|
||||
6,//WP_L2A2_GRENADE,
|
||||
6,//WP_MDN11_GRENADE,
|
||||
6,//WP_SMOHG92_GRENADE,
|
||||
|
||||
6,//WP_ANM14_GRENADE,
|
||||
6//WP_M15_GRENADE,
|
||||
6,//WP_M15_GRENADE,
|
||||
|
||||
6,//WP_MP5
|
||||
6,//WP_SIG551
|
||||
};
|
||||
|
||||
int GetNearestVisibleWPToItem(vec3_t org, int ignore)
|
||||
|
|
|
@ -138,6 +138,13 @@ static qboolean BG_ParseGametypeInfo ( int gametypeIndex )
|
|||
gametype->respawnType = RT_NORMAL;
|
||||
}
|
||||
|
||||
// A gametype can be based off another gametype which means it uses all the gametypes entities
|
||||
trap_GPG_FindPairValue ( gtGroup, "basegametype", "", temp );
|
||||
if ( temp[0] )
|
||||
{
|
||||
gametype->basegametype = trap_VM_LocalStringAlloc ( temp );
|
||||
}
|
||||
|
||||
// What percentage doest he backpack replenish?
|
||||
trap_GPG_FindPairValue ( gtGroup, "backpack", "0", temp );
|
||||
gametype->backpack = atoi(temp);
|
||||
|
|
|
@ -223,6 +223,27 @@ Pistol, uses 45 rounds
|
|||
OUTFITTING_GROUP_PISTOL,
|
||||
},
|
||||
|
||||
/*QUAKED pickup_weapon_silvertalon (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Pistol, uses 45 rounds
|
||||
*/
|
||||
{
|
||||
"pickup_weapon_silvertalon",
|
||||
"sound/player/pickup/weapon.wav",
|
||||
{ "models/weapons/silver_talon/world/silver_talonworld.glm",
|
||||
0, 0, 0},
|
||||
/* icon */ "gfx/menus/hud/weapon_icons/silver_talonicon",
|
||||
"*gfx/menus/weapon_renders/silver_talon",
|
||||
"a",
|
||||
/* pickup */ "Silver Talon",
|
||||
7,
|
||||
IT_WEAPON,
|
||||
WP_SILVER_TALON,
|
||||
/* precache */ "",
|
||||
/* sounds */ "",
|
||||
|
||||
OUTFITTING_GROUP_PISTOL,
|
||||
},
|
||||
|
||||
/*QUAKED pickup_weapon_microuzi (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Sub-Machinegun, uses 9mm rounds
|
||||
*/
|
||||
|
@ -265,6 +286,27 @@ Sub-Machinegun, uses 45 rounds
|
|||
OUTFITTING_GROUP_SECONDARY,
|
||||
},
|
||||
|
||||
/*QUAKED pickup_weapon_MP5 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Sub-Machinegun, uses 9mm rounds
|
||||
*/
|
||||
{
|
||||
"pickup_weapon_MP5",
|
||||
"sound/player/pickup/weapon.wav",
|
||||
{ "models/weapons/mp5/world/mp5world.glm",
|
||||
0, 0, 0},
|
||||
/* icon */ "gfx/menus/hud/weapon_icons/mp5_icon",
|
||||
"gfx/menus/weapon_renders/mp5",
|
||||
"a",
|
||||
/* pickup */ "MP5 Sub-machinegun",
|
||||
30,
|
||||
IT_WEAPON,
|
||||
WP_MP5,
|
||||
/* precache */ "",
|
||||
/* sounds */ "",
|
||||
|
||||
OUTFITTING_GROUP_PRIMARY,
|
||||
},
|
||||
|
||||
/*QUAKED pickup_weapon_USAS_12 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Shotgun, uses 12-gauge rounds
|
||||
ammo ---------- amount of ammo (defaults to 10)
|
||||
|
@ -371,6 +413,27 @@ Assault Rifle, uses 5.56 rounds
|
|||
OUTFITTING_GROUP_PRIMARY,
|
||||
},
|
||||
|
||||
/*QUAKED pickup_weapon_SIG551 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Assault Rifle, uses 5.56 rounds
|
||||
*/
|
||||
{
|
||||
"pickup_weapon_SIG551",
|
||||
"sound/player/pickup/weapon.wav",
|
||||
{ "models/weapons/sig551/world/sig551world.glm",
|
||||
0, 0, 0},
|
||||
/* icon */ "gfx/menus/hud/weapon_icons/sig551_icon",
|
||||
"gfx/menus/weapon_renders/sig551",
|
||||
"an",
|
||||
/* pickup */ "SIG551 Assault",
|
||||
30,
|
||||
IT_WEAPON,
|
||||
WP_SIG551,
|
||||
/* precache */ "",
|
||||
/* sounds */ "",
|
||||
|
||||
OUTFITTING_GROUP_PRIMARY,
|
||||
},
|
||||
|
||||
/*QUAKED pickup_weapon_M60 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Machinegun, uses 7.62 rounds
|
||||
*/
|
||||
|
@ -434,27 +497,6 @@ Grenade Launcher, uses 40mm rounds
|
|||
OUTFITTING_GROUP_PRIMARY,
|
||||
},
|
||||
|
||||
/*QUAKED pickup_weapon_M67 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Grenade
|
||||
*/
|
||||
{
|
||||
"pickup_weapon_M67",
|
||||
"sound/player/pickup/weapon.wav",
|
||||
{ "models/weapons/m67/world/m67world.glm",
|
||||
0, 0, 0},
|
||||
/* icon */ "gfx/menus/hud/weapon_icons/m67_icon",
|
||||
"*gfx/menus/weapon_renders/m67",
|
||||
"a",
|
||||
/* pickup */ "M67 grenade",
|
||||
5,
|
||||
IT_WEAPON,
|
||||
WP_M67_GRENADE,
|
||||
/* precache */ "",
|
||||
/* sounds */ "",
|
||||
|
||||
OUTFITTING_GROUP_GRENADE,
|
||||
},
|
||||
|
||||
/*QUAKED pickup_weapon_M84 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Grenade
|
||||
*/
|
||||
|
@ -476,69 +518,6 @@ Grenade
|
|||
OUTFITTING_GROUP_GRENADE,
|
||||
},
|
||||
|
||||
/*QUAKED pickup_weapon_F1 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Grenade
|
||||
*/
|
||||
{
|
||||
"pickup_weapon_F1",
|
||||
"sound/player/pickup/weapon.wav",
|
||||
{ "models/weapons/f1/world/f1world.glm",
|
||||
0, 0, 0},
|
||||
/* icon */ "gfx/menus/hud/weapon_icons/f1_icon",
|
||||
"*gfx/menus/weapon_renders/m84",
|
||||
"a",
|
||||
/* pickup */ "F1 Frag",
|
||||
5,
|
||||
IT_WEAPON,
|
||||
WP_F1_GRENADE,
|
||||
/* precache */ "",
|
||||
/* sounds */ "",
|
||||
|
||||
OUTFITTING_GROUP_GRENADE,
|
||||
},
|
||||
|
||||
/*QUAKED pickup_weapon_L2A2 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Grenade
|
||||
*/
|
||||
{
|
||||
"pickup_weapon_L2A2",
|
||||
"sound/player/pickup/weapon.wav",
|
||||
{ "models/weapons/l2a2/world/l2a2world.glm",
|
||||
0, 0, 0},
|
||||
/* icon */ "gfx/menus/hud/weapon_icons/l2a2_icon",
|
||||
"*gfx/menus/weapon_renders/m84",
|
||||
"a",
|
||||
/* pickup */ "L2A2 grenade",
|
||||
5,
|
||||
IT_WEAPON,
|
||||
WP_L2A2_GRENADE,
|
||||
/* precache */ "",
|
||||
/* sounds */ "",
|
||||
|
||||
OUTFITTING_GROUP_GRENADE,
|
||||
},
|
||||
|
||||
/*QUAKED pickup_weapon_MDN11 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Grenade
|
||||
*/
|
||||
{
|
||||
"pickup_weapon_MDN11",
|
||||
"sound/player/pickup/weapon.wav",
|
||||
{ "models/weapons/mdn11/world/mdn11world.glm",
|
||||
0, 0, 0},
|
||||
/* icon */ "gfx/menus/hud/weapon_icons/mdn11_icon",
|
||||
"*gfx/menus/weapon_renders/mdn11",
|
||||
"a",
|
||||
/* pickup */ "MDN11 grenade",
|
||||
5,
|
||||
IT_WEAPON,
|
||||
WP_MDN11_GRENADE,
|
||||
/* precache */ "",
|
||||
/* sounds */ "",
|
||||
|
||||
OUTFITTING_GROUP_GRENADE,
|
||||
},
|
||||
|
||||
/*QUAKED pickup_weapon_SMOHG92 (0 .6 .6) (-15 -15 -15) (15 15 15)
|
||||
Grenade
|
||||
*/
|
||||
|
|
|
@ -36,11 +36,11 @@ char bg_availableOutfitting[WP_NUM_WEAPONS] = {-1};
|
|||
|
||||
int bg_outfittingGroups[OUTFITTING_GROUP_MAX][MAX_OUTFITTING_GROUPITEM] =
|
||||
{
|
||||
{ MODELINDEX_WEAPON_AK74, MODELINDEX_WEAPON_M4, MODELINDEX_WEAPON_USAS12, MODELINDEX_WEAPON_MSG90A1, MODELINDEX_WEAPON_M60, MODELINDEX_WEAPON_RPG7, MODELINDEX_WEAPON_MM1, -1, -1, -1 },
|
||||
{ MODELINDEX_WEAPON_M590, MODELINDEX_WEAPON_MICROUZI, MODELINDEX_WEAPON_M3A1, -1, -1, -1, -1, -1, -1, - 1 },
|
||||
{ MODELINDEX_WEAPON_M19, MODELINDEX_WEAPON_SOCOM, -1, -1, -1, -1, -1, -1, -1, -1 },
|
||||
{ MODELINDEX_WEAPON_SMOHG92, MODELINDEX_WEAPON_M84, MODELINDEX_WEAPON_M15, MODELINDEX_WEAPON_ANM14, -1, -1, -1, -1, -1, -1 },
|
||||
{ MODELINDEX_ARMOR, MODELINDEX_NIGHTVISION, MODELINDEX_THERMAL, -1, -1, -1, -1, -1, -1, -1 },
|
||||
{ MODELINDEX_WEAPON_AK74, MODELINDEX_WEAPON_M4, MODELINDEX_WEAPON_SIG551, MODELINDEX_WEAPON_USAS12, MODELINDEX_WEAPON_MSG90A1, MODELINDEX_WEAPON_M60, MODELINDEX_WEAPON_MP5, MODELINDEX_WEAPON_RPG7, MODELINDEX_WEAPON_MM1, -1, -1, -1 },
|
||||
{ MODELINDEX_WEAPON_M590, MODELINDEX_WEAPON_MICROUZI, MODELINDEX_WEAPON_M3A1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
||||
{ MODELINDEX_WEAPON_M19, MODELINDEX_WEAPON_SOCOM, MODELINDEX_WEAPON_SILVERTALON, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
||||
{ MODELINDEX_WEAPON_SMOHG92, MODELINDEX_WEAPON_M84, MODELINDEX_WEAPON_M15, MODELINDEX_WEAPON_ANM14, -1, -1, -1, -1, -1, -1, -1, -1 },
|
||||
{ MODELINDEX_ARMOR, MODELINDEX_NIGHTVISION, MODELINDEX_THERMAL, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -143,7 +143,12 @@ void PM_TorsoAnimation( playerState_t* ps )
|
|||
{
|
||||
case WEAPON_SPAWNING:
|
||||
case WEAPON_READY:
|
||||
if ( (ps->pm_flags & PMF_ZOOMED) && weaponData[ps->weapon].animIdleZoomed )
|
||||
|
||||
if ( ps->stats[STAT_USEWEAPONDROP] )
|
||||
{
|
||||
PM_ContinueTorsoAnim ( ps, TORSO_USE );
|
||||
}
|
||||
else if ( (ps->pm_flags & PMF_ZOOMED) && weaponData[ps->weapon].animIdleZoomed )
|
||||
{
|
||||
PM_ContinueTorsoAnim ( ps, weaponData[ps->weapon].animIdleZoomed );
|
||||
}
|
||||
|
@ -1257,7 +1262,7 @@ void BG_PlayerAngles (
|
|||
AnglesSubtract( headAngles, lowerTorsoAngles, headAngles );
|
||||
AnglesSubtract( lowerTorsoAngles, legsAngles, lowerTorsoAngles );
|
||||
|
||||
if ( legs )
|
||||
if ( legs && ghoul2 )
|
||||
{
|
||||
AnglesToAxis( legsAngles, legs );
|
||||
|
||||
|
@ -1738,4 +1743,21 @@ int BG_ParseOutfittingTemplates ( qboolean force )
|
|||
return bg_outfittingCount;
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
BG_ApplyLeanOffset
|
||||
|
||||
Applies the given lean offset to the origin
|
||||
========================
|
||||
*/
|
||||
void BG_ApplyLeanOffset ( playerState_t* ps, vec3_t origin )
|
||||
{
|
||||
float leanOffset;
|
||||
vec3_t up;
|
||||
vec3_t right;
|
||||
|
||||
leanOffset = (float)(ps->leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET;
|
||||
AngleVectors( ps->viewangles, NULL, right, up);
|
||||
VectorMA( origin, leanOffset, right, origin );
|
||||
VectorMA( origin, Q_fabs(leanOffset) * -0.20f, up, origin );
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ static void PM_Friction( void )
|
|||
drop += control*pm_ladderfriction*pml.frametime;
|
||||
}
|
||||
}
|
||||
else if ( pm->waterlevel )
|
||||
else if ( pm->waterlevel > 1 )
|
||||
{
|
||||
drop += speed*pm_waterfriction*pm->waterlevel*pml.frametime;
|
||||
}
|
||||
|
@ -993,6 +993,97 @@ static void PM_NoclipMove( void ) {
|
|||
|
||||
//============================================================================
|
||||
|
||||
/*
|
||||
==============
|
||||
PM_Use
|
||||
|
||||
Generates a use event
|
||||
==============
|
||||
*/
|
||||
#define USE_DELAY 2000
|
||||
|
||||
void PM_Use( void )
|
||||
{
|
||||
int useTime = 0;
|
||||
|
||||
// don't allow attack until all buttons are up
|
||||
if ( pm->ps->pm_flags & PMF_RESPAWNED )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// ignore if not a normal player
|
||||
if ( pm->ps->pm_type != PM_NORMAL )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// check for dead player
|
||||
if ( pm->ps->stats[STAT_HEALTH] <= 0 )
|
||||
{
|
||||
pm->ps->weapon = WP_NONE;
|
||||
return;
|
||||
}
|
||||
|
||||
// Cant use so dont bother letting them try
|
||||
|
||||
if ( !(pm->ps->pm_flags & PMF_CAN_USE ) || !(pm->cmd.buttons & BUTTON_USE ) )
|
||||
{
|
||||
if ( pm->ps->stats[STAT_USEWEAPONDROP] )
|
||||
{
|
||||
pm->ps->stats[STAT_USEWEAPONDROP] -= pml.msec;
|
||||
if ( pm->ps->stats[STAT_USEWEAPONDROP] < 0 )
|
||||
{
|
||||
pm->ps->stats[STAT_USEWEAPONDROP] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ( pm->ps->pm_debounce & PMD_USE )
|
||||
{
|
||||
pm->ps->pm_debounce &= ~PMD_USE;
|
||||
pm->ps->stats[STAT_USETIME] = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
pm->ps->pm_debounce |= PMD_USE;
|
||||
|
||||
useTime = pm->ps->stats[STAT_USETIME_MAX];
|
||||
if ( useTime )
|
||||
{
|
||||
int elapsedTime = pm->ps->stats[STAT_USETIME];
|
||||
|
||||
if ( elapsedTime < useTime )
|
||||
{
|
||||
elapsedTime += pml.msec;
|
||||
}
|
||||
|
||||
pm->ps->stats[STAT_USEWEAPONDROP] += pml.msec;
|
||||
if ( pm->ps->stats[STAT_USEWEAPONDROP] > 300 )
|
||||
{
|
||||
pm->ps->stats[STAT_USEWEAPONDROP] = 300;
|
||||
}
|
||||
|
||||
if ( elapsedTime >= useTime )
|
||||
{
|
||||
pm->ps->stats[STAT_USETIME] = 0;
|
||||
PM_AddEvent ( EV_USE );
|
||||
}
|
||||
else
|
||||
{
|
||||
pm->ps->stats[STAT_USETIME] = elapsedTime;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !(pm->ps->pm_debounce & PMD_USE) )
|
||||
{
|
||||
PM_AddEvent ( EV_USE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
PM_FootstepForSurface
|
||||
|
@ -1106,7 +1197,7 @@ static void PM_CrashLand( int impactMaterial, vec3_t impactNormal )
|
|||
pm->ps->velocity[0] *= 0.25f;
|
||||
pm->ps->velocity[1] *= 0.25f;
|
||||
|
||||
pm->ps->pm_time = 500;
|
||||
pm->ps->pm_time = 750;
|
||||
}
|
||||
|
||||
// create a local entity event to play the sound
|
||||
|
@ -2014,11 +2105,7 @@ TAnimWeapon* PM_GetAnimFromName ( char *animName, playerState_t *ps, int *animIn
|
|||
PM_SetWeaponAnimChoice(aW);
|
||||
break;
|
||||
|
||||
case WP_M67_GRENADE:
|
||||
case WP_M84_GRENADE:
|
||||
case WP_F1_GRENADE:
|
||||
case WP_L2A2_GRENADE:
|
||||
case WP_MDN11_GRENADE:
|
||||
case WP_SMOHG92_GRENADE:
|
||||
case WP_ANM14_GRENADE:
|
||||
case WP_M15_GRENADE:
|
||||
|
@ -2230,12 +2317,9 @@ static void PM_BeginWeaponChange(int weapon)
|
|||
}
|
||||
|
||||
// turn off any kind of zooming when weapon switching.
|
||||
if( pm->ps->pm_flags & PMF_ZOOMED )
|
||||
{
|
||||
pm->ps->zoomFov = 0;
|
||||
pm->ps->zoomTime = pm->ps->commandTime;
|
||||
pm->ps->zoomTime = 0;
|
||||
pm->ps->pm_flags &= ~(PMF_ZOOM_FLAGS);
|
||||
}
|
||||
|
||||
// Clear the weapon time
|
||||
pm->ps->weaponTime = 0;
|
||||
|
@ -2245,7 +2329,7 @@ static void PM_BeginWeaponChange(int weapon)
|
|||
PM_AddEvent(EV_CHANGE_WEAPON);
|
||||
pm->ps->weaponstate = WEAPON_DROPPING;
|
||||
|
||||
if( pm->ps->weapon >= WP_M67_GRENADE && pm->ps->weapon <= WP_M15_GRENADE && pm->ps->clip[ATTACK_NORMAL][pm->ps->weapon] <= 0 )
|
||||
if( pm->ps->weapon >= WP_M84_GRENADE && pm->ps->weapon <= WP_M15_GRENADE && pm->ps->clip[ATTACK_NORMAL][pm->ps->weapon] <= 0 )
|
||||
{
|
||||
// We don't want to play the 'putaway' anim for the grenades if we are out of grenades!
|
||||
return;
|
||||
|
@ -2291,14 +2375,14 @@ static void PM_FinishWeaponChange( void )
|
|||
}
|
||||
|
||||
// We don't want to play the 'takeout' anim for the grenades if we are about to reload anyway
|
||||
if( pm->ps->weapon >= WP_M67_GRENADE && pm->ps->weapon <= WP_M15_GRENADE && pm->ps->clip[ATTACK_NORMAL][pm->ps->weapon] <=0 )
|
||||
if( pm->ps->weapon >= WP_M84_GRENADE && pm->ps->weapon <= WP_M15_GRENADE && pm->ps->clip[ATTACK_NORMAL][pm->ps->weapon] <=0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
PM_HandleWeaponAction(WACT_READY);
|
||||
|
||||
pm->ps->weaponTime = min(500,pm->ps->weaponTime);
|
||||
pm->ps->weaponTime = min(150,pm->ps->weaponTime);
|
||||
|
||||
PM_StartTorsoAnim( pm->ps, weaponData[pm->ps->weapon].animRaise, pm->ps->weaponAnimTime );
|
||||
}
|
||||
|
@ -2387,6 +2471,7 @@ PM_EndRefillClip
|
|||
void PM_EndRefillClip(void)
|
||||
{
|
||||
pm->ps->weaponstate=WEAPON_READY;
|
||||
pm->ps->weaponFireBurstCount = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2415,6 +2500,24 @@ int PM_GetAttackButtons(void)
|
|||
pm->ps->pm_debounce &= ~PMD_FIREMODE;
|
||||
}
|
||||
|
||||
// As soon as the button is released you are ok to press attack again
|
||||
if ( pm->ps->pm_debounce & PMD_ATTACK )
|
||||
{
|
||||
if ( !(buttons & BUTTON_ATTACK) )
|
||||
{
|
||||
pm->ps->pm_debounce &= ~(PMD_ATTACK);
|
||||
}
|
||||
else if ( pm->ps->firemode[pm->ps->weapon] != WP_FIREMODE_AUTO )
|
||||
{
|
||||
buttons &= ~BUTTON_ATTACK;
|
||||
}
|
||||
}
|
||||
|
||||
if ( pm->ps->stats[STAT_FROZEN] )
|
||||
{
|
||||
buttons &= ~BUTTON_ATTACK;
|
||||
}
|
||||
|
||||
// Handle firebutton in varous firemodes.
|
||||
switch( pm->ps->firemode[pm->ps->weapon] )
|
||||
{
|
||||
|
@ -2422,26 +2525,16 @@ int PM_GetAttackButtons(void)
|
|||
break;
|
||||
|
||||
case WP_FIREMODE_BURST:
|
||||
|
||||
// Debounce attack button and disable other buttons during burst fire.
|
||||
if(buttons&BUTTON_ATTACK)
|
||||
{
|
||||
if( !(pm->ps->pm_debounce & PMD_ATTACK))
|
||||
{
|
||||
pm->ps->pm_debounce |= PMD_ATTACK;
|
||||
if(!pm->ps->weaponFireBurstCount)
|
||||
{
|
||||
pm->ps->weaponFireBurstCount=3;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
buttons &= ~BUTTON_ATTACK;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pm->ps->pm_debounce &= ~PMD_ATTACK;
|
||||
}
|
||||
|
||||
if(pm->ps->weaponFireBurstCount)
|
||||
{
|
||||
buttons|=BUTTON_ATTACK;
|
||||
|
@ -2454,23 +2547,6 @@ int PM_GetAttackButtons(void)
|
|||
break;
|
||||
|
||||
case WP_FIREMODE_SINGLE:
|
||||
// Debounce attack button.
|
||||
if(buttons&BUTTON_ATTACK)
|
||||
{
|
||||
if(!(pm->ps->pm_debounce & PMD_ATTACK))
|
||||
{
|
||||
pm->ps->pm_debounce |= PMD_ATTACK;
|
||||
}
|
||||
else
|
||||
{
|
||||
buttons&=~BUTTON_ATTACK;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pm->ps->pm_debounce &= ~PMD_ATTACK;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2513,16 +2589,20 @@ static void PM_Weapon_AddInaccuracy( attackType_t attack )
|
|||
// Zoomed sniper weapons don't add innacuracy if ont hte ground
|
||||
if( (pm->ps->pm_flags & PMF_ZOOMED) && pml.groundPlane )
|
||||
{
|
||||
return;
|
||||
pm->ps->inaccuracy += weaponData[pm->ps->weapon].attack[attack].zoomInaccuracy;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
pm->ps->inaccuracy += weaponData[pm->ps->weapon].attack[attack].inaccuracy;
|
||||
}
|
||||
|
||||
pm->ps->inaccuracyTime = RECOVER_TIME;
|
||||
|
||||
if ( pm->ps->inaccuracy > weaponData[pm->ps->weapon].attack[attack].maxInaccuracy )
|
||||
{
|
||||
pm->ps->inaccuracy = weaponData[pm->ps->weapon].attack[attack].maxInaccuracy;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -2742,6 +2822,12 @@ static void PM_Weapon( void )
|
|||
// Get modifed attack buttons.
|
||||
attackButtons = PM_GetAttackButtons();
|
||||
|
||||
// Gun goes away when using something
|
||||
if ( pm->ps->stats[STAT_USEWEAPONDROP] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// don't allow attack until all buttons are up
|
||||
if ( pm->ps->pm_flags & PMF_RESPAWNED )
|
||||
{
|
||||
|
@ -2857,11 +2943,6 @@ static void PM_Weapon( void )
|
|||
if( pm->ps->weaponstate == WEAPON_ZOOMIN )
|
||||
{
|
||||
// The zoomfov may still be remembered from a reload while zooming
|
||||
if ( !pm->ps->zoomFov )
|
||||
{
|
||||
pm->ps->zoomFov = 20;
|
||||
}
|
||||
|
||||
pm->ps->pm_flags |= PMF_ZOOMED;
|
||||
pm->ps->pm_flags |= PMF_ZOOM_LOCKED;
|
||||
pm->ps->pm_flags &= ~PMF_ZOOM_REZOOM;
|
||||
|
@ -2873,11 +2954,7 @@ static void PM_Weapon( void )
|
|||
{
|
||||
switch(pm->ps->weapon)
|
||||
{
|
||||
case WP_M67_GRENADE:
|
||||
case WP_M84_GRENADE:
|
||||
case WP_F1_GRENADE:
|
||||
case WP_L2A2_GRENADE:
|
||||
case WP_MDN11_GRENADE:
|
||||
case WP_SMOHG92_GRENADE:
|
||||
case WP_ANM14_GRENADE:
|
||||
case WP_M15_GRENADE:
|
||||
|
@ -2939,6 +3016,7 @@ static void PM_Weapon( void )
|
|||
pm->ps->weaponstate=WEAPON_READY;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2994,7 +3072,7 @@ static void PM_Weapon( void )
|
|||
|
||||
default:
|
||||
PM_EndRefillClip();
|
||||
break;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(pm->ps->pm_flags & PMF_ZOOM_DEFER_RELOAD )
|
||||
|
@ -3029,7 +3107,7 @@ static void PM_Weapon( void )
|
|||
}
|
||||
|
||||
// Handle zooming in/out for sniper rifle.
|
||||
if(pm->ps->weapon==WP_MSG90A1)
|
||||
if( weaponData[pm->ps->weapon].zoom[0].fov )
|
||||
{
|
||||
if( (attackButtons&BUTTON_ALT_ATTACK) || (pm->ps->pm_flags & PMF_ZOOM_REZOOM) )
|
||||
{
|
||||
|
@ -3047,22 +3125,20 @@ static void PM_Weapon( void )
|
|||
{
|
||||
if(pm->cmd.buttons&BUTTON_ZOOMIN)
|
||||
{
|
||||
pm->ps->zoomFov = pm->ps->zoomFov >> 1;
|
||||
if ( pm->ps->zoomFov < 5)
|
||||
if ( pm->ps->zoomFov + 1 < ZOOMLEVEL_MAX && weaponData[pm->ps->weapon].zoom[pm->ps->zoomFov+1].fov )
|
||||
{
|
||||
pm->ps->zoomFov = 5;
|
||||
}
|
||||
pm->ps->zoomFov++;
|
||||
pm->ps->weaponTime=175;
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if(pm->cmd.buttons&BUTTON_ZOOMOUT)
|
||||
{
|
||||
pm->ps->zoomFov = pm->ps->zoomFov << 1;
|
||||
if(pm->ps->zoomFov > 20 )
|
||||
if ( pm->ps->zoomFov > 0 )
|
||||
{
|
||||
pm->ps->zoomFov = 20;
|
||||
}
|
||||
pm->ps->zoomFov--;
|
||||
pm->ps->weaponTime=175;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -3176,6 +3252,8 @@ static void PM_Weapon( void )
|
|||
return;
|
||||
}
|
||||
|
||||
pm->ps->pm_debounce |= PMD_ATTACK;
|
||||
|
||||
// Decrease the ammo
|
||||
(*ammoSource) -= attackData->fireAmount;
|
||||
|
||||
|
@ -3203,11 +3281,7 @@ static void PM_Weapon( void )
|
|||
|
||||
break;
|
||||
|
||||
case WP_M67_GRENADE:
|
||||
case WP_M84_GRENADE:
|
||||
case WP_F1_GRENADE:
|
||||
case WP_L2A2_GRENADE:
|
||||
case WP_MDN11_GRENADE:
|
||||
case WP_SMOHG92_GRENADE:
|
||||
case WP_ANM14_GRENADE:
|
||||
case WP_M15_GRENADE:
|
||||
|
@ -3325,10 +3399,9 @@ static void PM_CheckLean( void )
|
|||
|
||||
// check for collision
|
||||
VectorCopy( pm->ps->origin, start );
|
||||
start[2] += pm->ps->viewheight;
|
||||
AngleVectors( pm->ps->viewangles, NULL, right, NULL );
|
||||
VectorSet( mins, -6, -6, -8 );
|
||||
VectorSet( maxs, 6, 6, 8 );
|
||||
VectorSet( mins, -6, -6, -20 );
|
||||
VectorSet( maxs, 6, 6, 20 );
|
||||
|
||||
// since we're moving the camera over
|
||||
// check that move
|
||||
|
@ -3551,8 +3624,11 @@ void PmoveSingle (pmove_t *pmove) {
|
|||
}
|
||||
}
|
||||
|
||||
// Cant run when zoomed
|
||||
if ( (pm->ps->pm_flags&PMF_ZOOMED) || pm->ps->weaponstate == WEAPON_ZOOMIN || (pm->cmd.buttons & (BUTTON_LEAN_LEFT|BUTTON_LEAN_RIGHT)) )
|
||||
// Cant run when zoomed, leaning, or using something that takes time
|
||||
if ( (pm->ps->pm_flags&PMF_ZOOMED) ||
|
||||
(pm->ps->weaponstate == WEAPON_ZOOMIN) ||
|
||||
(pm->cmd.buttons & (BUTTON_LEAN_LEFT|BUTTON_LEAN_RIGHT)) ||
|
||||
(pm->ps->stats[STAT_USEWEAPONDROP]) )
|
||||
{
|
||||
if ( pm->cmd.forwardmove > 64 )
|
||||
{
|
||||
|
@ -3758,6 +3834,9 @@ void PmoveSingle (pmove_t *pmove) {
|
|||
// weapons
|
||||
PM_Weapon();
|
||||
|
||||
// Use
|
||||
PM_Use ( );
|
||||
|
||||
// torso animation
|
||||
PM_TorsoAnimation( pm->ps );
|
||||
|
||||
|
@ -3788,13 +3867,8 @@ void PM_UpdatePVSOrigin ( pmove_t *pmove )
|
|||
// Set a pm flag for leaning and calculate the view origin for the lean
|
||||
if ( pm->ps->leanTime - LEAN_TIME != 0 )
|
||||
{
|
||||
vec3_t right;
|
||||
float leanOffset;
|
||||
|
||||
leanOffset = (float)(pm->ps->leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET;
|
||||
|
||||
AngleVectors( pm->ps->viewangles, NULL, right, NULL );
|
||||
VectorMA( pm->ps->origin, leanOffset, right, pm->ps->pvsOrigin );
|
||||
VectorCopy ( pm->ps->origin, pm->ps->pvsOrigin );
|
||||
BG_ApplyLeanOffset ( pm->ps, pm->ps->pvsOrigin );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3890,11 +3964,18 @@ int BG_FindLadder ( vec3_t pos )
|
|||
float dist2 = DistanceSquared( pos, pm_ladders[ladder].origin );
|
||||
|
||||
if ( dist2 < dist )
|
||||
{
|
||||
vec3_t diff;
|
||||
VectorSubtract ( pm_ladders[ladder].origin, pos, diff );
|
||||
diff[2] = 0;
|
||||
|
||||
if ( VectorLengthSquared ( diff ) < 500 * 500 )
|
||||
{
|
||||
dist = dist2;
|
||||
result = ladder;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -37,9 +37,11 @@
|
|||
//#define GAME_VERSION "sof2mp-1.00.22" sent on 4/26/2002
|
||||
//#define GAME_VERSION "sof2mp-1.00.23" sent on 4/27/2002
|
||||
#ifdef GERMAN_BUILD
|
||||
#define GAME_VERSION "sof2mp-1.00g"
|
||||
// #define GAME_VERSION "sof2mp-1.00g"
|
||||
#define GAME_VERSION "sof2mp-1.02g"
|
||||
#else
|
||||
#define GAME_VERSION "sof2mp-1.00"
|
||||
// #define GAME_VERSION "sof2mp-1.00"
|
||||
#define GAME_VERSION "sof2mp-1.02"
|
||||
#endif
|
||||
|
||||
#define DEFAULT_GRAVITY 800
|
||||
|
@ -65,7 +67,7 @@
|
|||
#define DEAD_PLAYER_Z_MAX -30
|
||||
|
||||
#define DUCK_ACCURACY_MODIFIER 0.75f
|
||||
#define JUMP_ACCURACY_MODIFIER 1.5f
|
||||
#define JUMP_ACCURACY_MODIFIER 2.0f
|
||||
|
||||
#define MINS_Z -46
|
||||
|
||||
|
@ -136,7 +138,9 @@ enum
|
|||
CS_TEAM_INFO = CS_ICONS + MAX_ICONS,
|
||||
CS_AMBIENT_SOUNDSETS = CS_TEAM_INFO + TEAM_NUM_TEAMS,
|
||||
|
||||
CS_MAX = CS_AMBIENT_SOUNDSETS + MAX_AMBIENT_SOUNDSETS
|
||||
CS_HUDICONS = CS_AMBIENT_SOUNDSETS + MAX_AMBIENT_SOUNDSETS,
|
||||
|
||||
CS_MAX = CS_HUDICONS + MAX_HUDICONS,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -318,6 +322,8 @@ typedef enum
|
|||
TORSO_RELOAD_MM1_SHELL,
|
||||
TORSO_RELOAD_MM1_END,
|
||||
|
||||
TORSO_USE,
|
||||
|
||||
MAX_ANIMATIONS
|
||||
|
||||
} animNumber_t;
|
||||
|
@ -345,6 +351,7 @@ typedef struct ladder_s
|
|||
// changes so a restart of the same anim can be detected
|
||||
#define ANIM_TOGGLEBIT 2048 // Note that there are 12 bits (max 4095) for animations.
|
||||
#define ITEM_AUTOSWITCHBIT (1<<31)
|
||||
#define ITEM_QUIETPICKUP (1<<30)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
@ -402,6 +409,7 @@ typedef enum {
|
|||
#define PMF_AUTORELOAD 0x00400000 // autoreloading enabled
|
||||
|
||||
#define PMF_SIAMESETWINS 0x00800000
|
||||
#define PMF_FOLLOWFIRST 0x01000000 // First person following
|
||||
|
||||
#define PMF_ALL_TIMES (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK)
|
||||
#define PMF_ZOOM_FLAGS (PMF_ZOOMED|PMF_ZOOM_LOCKED|PMF_ZOOM_REZOOM|PMF_ZOOM_DEFER_RELOAD)
|
||||
|
@ -499,6 +507,10 @@ typedef enum
|
|||
STAT_GAMETYPE_ITEMS, // Which gametype items they have
|
||||
STAT_SEED, // seed used to keep weapon firing in sync
|
||||
STAT_OUTFIT_GRENADE, // indicates which greande is chosen in the outfitting
|
||||
STAT_USEICON, // icon to display when able to use a trigger or item
|
||||
STAT_USETIME, // elased time for using
|
||||
STAT_USETIME_MAX, // total time required to use
|
||||
STAT_USEWEAPONDROP, // value to drop weapon out of view when using
|
||||
|
||||
} statIndex_t;
|
||||
|
||||
|
@ -519,6 +531,9 @@ typedef enum
|
|||
PERS_RED_SCORE, // Blue team score
|
||||
PERS_BLUE_SCORE, // red team score
|
||||
|
||||
PERS_RED_ALIVE_COUNT, // number of alive people on the red team
|
||||
PERS_BLUE_ALIVE_COUNT, // number of alive people on the blue team
|
||||
|
||||
} persEnum_t;
|
||||
|
||||
|
||||
|
@ -607,6 +622,7 @@ typedef enum
|
|||
EV_WATER_CLEAR,
|
||||
|
||||
EV_ITEM_PICKUP, // normal item pickups are predictable
|
||||
EV_ITEM_PICKUP_QUIET, // quiet pickup
|
||||
|
||||
EV_NOAMMO,
|
||||
EV_CHANGE_WEAPON,
|
||||
|
@ -669,6 +685,13 @@ typedef enum
|
|||
|
||||
} entity_event_t; // There is a maximum of 256 events (8 bits transmission, 2 high bits for uniqueness)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
VEV_TALKSTART,
|
||||
VEV_TALKSTOP,
|
||||
|
||||
} voice_event_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GAME_OVER_TIMELIMIT,
|
||||
|
@ -791,6 +814,10 @@ typedef enum
|
|||
|
||||
ET_DEBUG_CYLINDER,
|
||||
|
||||
ET_GAMETYPE_TRIGGER,
|
||||
|
||||
ET_WALL,
|
||||
|
||||
ET_EVENTS // any of the EV_* events can be added freestanding
|
||||
// by setting eType to ET_EVENTS + eventNum
|
||||
// this avoids having to set eFlags and eventNum
|
||||
|
@ -943,6 +970,7 @@ typedef struct gametypeData_s
|
|||
const char* displayName;
|
||||
const char* script;
|
||||
const char* description;
|
||||
const char* basegametype;
|
||||
|
||||
respawnType_t respawnType;
|
||||
qboolean pickupsDisabled;
|
||||
|
@ -1022,7 +1050,7 @@ typedef struct SSkinTemplate
|
|||
#define MAX_MODEL_SOUNDS 8
|
||||
#define MAX_IDENTITIES 256
|
||||
#define MAX_OUTFITTINGS 64
|
||||
#define MAX_OUTFITTING_GROUPITEM 10
|
||||
#define MAX_OUTFITTING_GROUPITEM 12
|
||||
|
||||
typedef struct SModelSounds
|
||||
{
|
||||
|
@ -1068,7 +1096,7 @@ extern TIdentity bg_identities[];
|
|||
extern int bg_identityCount;
|
||||
extern goutfitting_t bg_outfittings[];
|
||||
extern int bg_outfittingCount;
|
||||
extern int bg_outfittingGroups[][10];
|
||||
extern int bg_outfittingGroups[][MAX_OUTFITTING_GROUPITEM];
|
||||
extern char *bg_weaponNames[WP_NUM_WEAPONS];
|
||||
extern stringID_table_t bg_animTable [MAX_ANIMATIONS+1];
|
||||
|
||||
|
@ -1085,6 +1113,7 @@ void BG_DecompressOutfitting ( const char* compressed, goutfitting_t* outf
|
|||
void BG_CompressOutfitting ( goutfitting_t* outfitting, char* compressed, int size );
|
||||
int BG_ParseOutfittingTemplates ( qboolean force );
|
||||
int BG_FindOutfitting ( goutfitting_t* outfitting);
|
||||
void BG_ApplyLeanOffset ( playerState_t* ps, vec3_t origin );
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
|
|
|
@ -14,24 +14,23 @@ char *bg_weaponNames[WP_NUM_WEAPONS] =
|
|||
"Knife", // WP_KNIFE,
|
||||
"M1911A1", // WP_M1911A1_PISTOL,
|
||||
"US SOCOM", // WP_US_SOCOM_PISTOL,
|
||||
"Silver Talon", // WP_SILVER_TALON,
|
||||
"M590", // WP_M590_SHOTGUN,
|
||||
"Micro Uzi", // WP_MICRO_UZI_SUBMACHINEGUN,
|
||||
"M3A1", // WP_M3A1_SUBMACHINEGUN,
|
||||
"MP5", // WP_MP5
|
||||
"USAS-12", // WP_USAS_12_SHOTGUN,
|
||||
"M4", // WP_M4_ASSAULT_RIFLE,
|
||||
"AK74", // WP_AK74_ASSAULT_RIFLE,
|
||||
"Sig 551", // WP_SIG551
|
||||
"MSG90A1", // WP_MSG90A1_SNIPER_RIFLE,
|
||||
"M60", // WP_M60_MACHINEGUN,
|
||||
"MM1", // WP_MM1_GRENADE_LAUNCHER,
|
||||
"RPG7", // WP_RPG7_LAUNCHER,
|
||||
"M67", // WP_M67_GRENADE,
|
||||
"M84", // WP_M84_GRENADE,
|
||||
"F1", // WP_F1_GRENADE,
|
||||
"L2A2", // WP_L2A2_GRENADE,
|
||||
"MDN11", // WP_MDN11_GRENADE,
|
||||
"SMOHG92", // WP_SMOHG92_GRENADE,
|
||||
"ANM14", // WP_ANM14_GRENADE,
|
||||
"M15" // WP_M15_GRENADE,
|
||||
"M15", // WP_M15_GRENADE,
|
||||
};
|
||||
|
||||
weaponData_t weaponData[WP_NUM_WEAPONS];
|
||||
|
@ -47,17 +46,33 @@ char *ammoNames[AMMO_MAX] =
|
|||
"40mm grenade", // AMMO_40,
|
||||
"RPG7", // AMMO_RPG7
|
||||
"M15", // AMMO_M15,
|
||||
"M67", // AMMO_M67,
|
||||
"M84", // AMMO_M84,
|
||||
"F1", // AMMO_F1,
|
||||
"L2A2", // AMMO_L2A2,
|
||||
"MDN11", // AMMO_MDN11,
|
||||
"SMOHG92", // AMMO_SMOHG92,
|
||||
"ANM14" // AMMO_ANM14,
|
||||
"ANM14", // AMMO_ANM14,
|
||||
"7.62mm belt", // AMMO_762_BELT,
|
||||
"9mm|mp5", // AMMO_9_MP5
|
||||
};
|
||||
|
||||
ammoData_t ammoData[AMMO_MAX];
|
||||
|
||||
static const char* BG_GetRealAmmoName ( ammo_t ammoNum )
|
||||
{
|
||||
static char name[64] = "";
|
||||
char* or;
|
||||
|
||||
or = strchr ( ammoNames[ammoNum], '|' );
|
||||
if ( or )
|
||||
{
|
||||
Q_strncpyz ( name, ammoNames[ammoNum], or - ammoNames[ammoNum] + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy ( name, ammoNames[ammoNum] );
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
static qboolean BG_ParseAmmoStats(ammo_t ammoNum, void *group)
|
||||
{
|
||||
char tmpStr[256];
|
||||
|
@ -66,7 +81,7 @@ static qboolean BG_ParseAmmoStats(ammo_t ammoNum, void *group)
|
|||
ammo = &ammoData[ammoNum];
|
||||
memset(ammo, 0, sizeof(ammoData_t));
|
||||
|
||||
ammo->name = (char*)trap_VM_LocalStringAlloc ( ammoNames[ammoNum] );
|
||||
ammo->name = (char*)trap_VM_LocalStringAlloc ( BG_GetRealAmmoName ( ammoNum ) );
|
||||
Q_strlwr ( ammo->name );
|
||||
|
||||
// Get the scale of the gore for this bullet
|
||||
|
@ -80,8 +95,7 @@ static qboolean BG_ParseAmmoStats(ammo_t ammoNum, void *group)
|
|||
|
||||
qboolean BG_InitAmmoStats(void)
|
||||
{
|
||||
void *GP2, *topGroup, *topSubs;
|
||||
char name[256];
|
||||
void *GP2, *topGroup;
|
||||
int i;
|
||||
|
||||
ammoData[AMMO_NONE].goreScale = 0.0f;
|
||||
|
@ -94,30 +108,37 @@ qboolean BG_InitAmmoStats(void)
|
|||
}
|
||||
|
||||
topGroup = trap_GP_GetBaseParseGroup(GP2);
|
||||
for ( i = 0; i < AMMO_MAX; i ++ )
|
||||
{
|
||||
void* topSubs;
|
||||
const char* realName;
|
||||
|
||||
realName = BG_GetRealAmmoName ( i );
|
||||
|
||||
topSubs = trap_GPG_GetSubGroups(topGroup);
|
||||
while(topSubs)
|
||||
{
|
||||
char name[256];
|
||||
trap_GPG_GetName(topSubs, name);
|
||||
if (Q_stricmp(name, "ammo") == 0)
|
||||
if (Q_stricmp(name, "ammo") != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
trap_GPG_FindPairValue(topSubs, "name", "", name);
|
||||
for(i=0;i<AMMO_MAX;i++)
|
||||
{
|
||||
if (Q_stricmp(ammoNames[i], name) == 0)
|
||||
if ( !Q_stricmp ( name, realName ) )
|
||||
{
|
||||
BG_ParseAmmoStats(i, topSubs );
|
||||
break;
|
||||
}
|
||||
|
||||
topSubs = trap_GPG_GetNext(topSubs);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (i == AMMO_MAX)
|
||||
if ( !topSubs )
|
||||
{
|
||||
Com_Printf("BG_InitAmmoStats: Unknown ammo: %s\n", name);
|
||||
Com_Printf("BG_InitAmmoStats: Unknown ammo: %s\n", BG_GetRealAmmoName ( i ) );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
topSubs = trap_GPG_GetNext(topSubs);
|
||||
}
|
||||
|
||||
trap_GP_Delete(&GP2);
|
||||
|
@ -125,7 +146,7 @@ qboolean BG_InitAmmoStats(void)
|
|||
return qtrue;
|
||||
}
|
||||
|
||||
static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void *attacksub )
|
||||
static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void *attacksub, qboolean pickupsDisabled )
|
||||
{
|
||||
void* sub;
|
||||
char tmpStr[256];
|
||||
|
@ -137,6 +158,38 @@ static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void
|
|||
return qtrue;
|
||||
}
|
||||
|
||||
// Zoom information
|
||||
trap_GPG_FindPairValue(attacksub, "action", "", tmpStr);
|
||||
if ( !Q_stricmp ( tmpStr, "toggleZoom" ) )
|
||||
{
|
||||
weaponData_t *weapon;
|
||||
void *value;
|
||||
int zoomlvl;
|
||||
|
||||
weapon = &weaponData[weaponNum];
|
||||
|
||||
sub = trap_GPG_FindSubGroup(attacksub, "zoomFactors");
|
||||
if ( !sub )
|
||||
{
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
value = trap_GPG_GetPairs(sub);
|
||||
zoomlvl = 0;
|
||||
while(value)
|
||||
{
|
||||
trap_GPV_GetName ( value, weapon->zoom[zoomlvl].name );
|
||||
trap_GPV_GetTopValue(value, tmpStr );
|
||||
|
||||
weapon->zoom[zoomlvl].fov = atoi ( tmpStr );
|
||||
|
||||
value = trap_GPV_GetNext ( value );
|
||||
zoomlvl ++;
|
||||
}
|
||||
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
// Assign a melee attribute if there is one
|
||||
trap_GPG_FindPairValue(attacksub, "mp_melee||melee", "none", tmpStr );
|
||||
if ( Q_stricmp ( tmpStr, "none" ) )
|
||||
|
@ -148,7 +201,19 @@ static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void
|
|||
trap_GPG_FindPairValue(attacksub, "name", "NONE", attack->name);
|
||||
trap_GPG_FindPairValue(attacksub, "hudIcon", "NONE", attack->icon);
|
||||
|
||||
if ( pickupsDisabled )
|
||||
{
|
||||
trap_GPG_FindPairValue(attacksub, "mp_ammoType_outfitting", "", tmpStr);
|
||||
if ( !tmpStr[0] )
|
||||
{
|
||||
trap_GPG_FindPairValue(attacksub, "mp_ammoType||ammoType", "none", tmpStr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
trap_GPG_FindPairValue(attacksub, "mp_ammoType||ammoType", "none", tmpStr);
|
||||
}
|
||||
|
||||
attack->ammoIndex = AMMO_NONE;
|
||||
for (i = 0; i < AMMO_MAX; i++)
|
||||
{
|
||||
|
@ -188,6 +253,8 @@ static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void
|
|||
attack->damage = atoi(tmpStr);
|
||||
trap_GPG_FindPairValue(attacksub, "mp_inaccuracy||inaccuracy", "0", tmpStr);
|
||||
attack->inaccuracy = (int)(atof(tmpStr)*1000.0f);
|
||||
trap_GPG_FindPairValue(attacksub, "mp_zoominaccuracy", "0", tmpStr);
|
||||
attack->zoomInaccuracy = (int)(atof(tmpStr)*1000.0f);
|
||||
trap_GPG_FindPairValue(attacksub, "mp_maxInaccuracy||maxInaccuracy", "0", tmpStr);
|
||||
attack->maxInaccuracy = (int)(atof(tmpStr)*1000.0f);
|
||||
trap_GPG_FindPairValue(attacksub, "mp_gore||gore", "YES", tmpStr);
|
||||
|
@ -306,7 +373,7 @@ static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void
|
|||
return qtrue;
|
||||
}
|
||||
|
||||
static qboolean BG_ParseWeaponStats(weapon_t weaponNum, void *group)
|
||||
static qboolean BG_ParseWeaponStats(weapon_t weaponNum, void *group, qboolean pickupsDisabled )
|
||||
{
|
||||
char tmpStr[256];
|
||||
weaponData_t *weapon;
|
||||
|
@ -342,15 +409,15 @@ static qboolean BG_ParseWeaponStats(weapon_t weaponNum, void *group)
|
|||
weapon->animReloadEnd = GetIDForString ( bg_animTable, tmpStr );
|
||||
|
||||
// primary attack
|
||||
BG_ParseAttackStats ( weaponNum, &weapon->attack[ATTACK_NORMAL], trap_GPG_FindSubGroup(group, "attack") );
|
||||
BG_ParseAttackStats ( weaponNum, &weapon->attack[ATTACK_NORMAL], trap_GPG_FindSubGroup(group, "attack"), pickupsDisabled );
|
||||
|
||||
// alternate attack
|
||||
BG_ParseAttackStats ( weaponNum, &weapon->attack[ATTACK_ALTERNATE], trap_GPG_FindSubGroup(group, "altattack") );
|
||||
BG_ParseAttackStats ( weaponNum, &weapon->attack[ATTACK_ALTERNATE], trap_GPG_FindSubGroup(group, "altattack"), pickupsDisabled );
|
||||
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
qboolean BG_InitWeaponStats(void)
|
||||
qboolean BG_InitWeaponStats( qboolean pickupsDisabled )
|
||||
{
|
||||
void *GP2, *topGroup, *topSubs;
|
||||
char name[256];
|
||||
|
@ -374,7 +441,7 @@ qboolean BG_InitWeaponStats(void)
|
|||
{
|
||||
if (Q_stricmp(bg_weaponNames[i], name) == 0)
|
||||
{
|
||||
BG_ParseWeaponStats(i, topSubs);
|
||||
BG_ParseWeaponStats(i, topSubs, pickupsDisabled );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -924,7 +991,7 @@ static qboolean BG_ParseWeapon(weapon_t weapon, void *group)
|
|||
return qtrue;
|
||||
}
|
||||
|
||||
qboolean BG_ParseInviewFile(void)
|
||||
qboolean BG_ParseInviewFile( qboolean pickupsDisabled )
|
||||
{
|
||||
void *GP2, *topGroup, *topSubs, *group;
|
||||
char name[256], temp[256];
|
||||
|
@ -998,7 +1065,7 @@ qboolean BG_ParseInviewFile(void)
|
|||
|
||||
BG_InitAmmoStats();
|
||||
|
||||
return BG_InitWeaponStats();
|
||||
return BG_InitWeaponStats( pickupsDisabled );
|
||||
}
|
||||
|
||||
TAnimWeapon *BG_GetInviewAnim(int weaponIdx,const char *animKey,int *animIndex)
|
||||
|
@ -1165,12 +1232,12 @@ void BG_CalculateBulletEndpoint ( vec3_t muzzlePoint, vec3_t fireAngs, float ina
|
|||
float f1;
|
||||
float f2;
|
||||
|
||||
f1 = (float)(Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
f2 = (float)(Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
f1 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
f2 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
fGaussianX = (f1-0.5f) + (f2-0.5f);
|
||||
|
||||
f1 = (float)(Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
f2 = (float)(Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
f1 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
f2 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
fGaussianY = (f1-0.5f) + (f2-0.5f);
|
||||
|
||||
fGaussian = fGaussianX * fGaussianX + fGaussianY * fGaussianY;
|
||||
|
|
|
@ -16,27 +16,27 @@ typedef enum
|
|||
// Pistols
|
||||
MOD_M1911A1_PISTOL,
|
||||
MOD_USSOCOM_PISTOL,
|
||||
MOD_SILVER_TALON,
|
||||
|
||||
// Secondarys
|
||||
MOD_M590_SHOTGUN,
|
||||
MOD_MICRO_UZI_SUBMACHINEGUN,
|
||||
MOD_M3A1_SUBMACHINEGUN,
|
||||
MOD_MP5,
|
||||
|
||||
// Primaries
|
||||
MOD_USAS_12_SHOTGUN,
|
||||
MOD_M4_ASSAULT_RIFLE,
|
||||
MOD_AK74_ASSAULT_RIFLE,
|
||||
MOD_SIG551,
|
||||
|
||||
MOD_MSG90A1_SNIPER_RIFLE,
|
||||
MOD_M60_MACHINEGUN,
|
||||
MOD_MM1_GRENADE_LAUNCHER,
|
||||
MOD_RPG7_LAUNCHER,
|
||||
|
||||
// Grenades
|
||||
MOD_M67_GRENADE,
|
||||
MOD_M84_GRENADE,
|
||||
MOD_F1_GRENADE,
|
||||
MOD_L2A2_GRENADE,
|
||||
MOD_MDN11_GRENADE,
|
||||
MOD_SMOHG92_GRENADE,
|
||||
MOD_ANM14_GRENADE,
|
||||
MOD_M15_GRENADE,
|
||||
|
@ -48,7 +48,8 @@ typedef enum
|
|||
MOD_SUICIDE,
|
||||
MOD_TEAMCHANGE,
|
||||
MOD_TARGET_LASER,
|
||||
MOD_TRIGGER_HURT
|
||||
MOD_TRIGGER_HURT,
|
||||
MOD_TRIGGER_HURT_NOSUICIDE
|
||||
|
||||
} meansOfDeath_t;
|
||||
|
||||
|
@ -62,27 +63,27 @@ typedef enum
|
|||
// Pistols
|
||||
WP_M1911A1_PISTOL,
|
||||
WP_USSOCOM_PISTOL,
|
||||
WP_SILVER_TALON,
|
||||
|
||||
// Secondarys
|
||||
WP_M590_SHOTGUN,
|
||||
WP_MICRO_UZI_SUBMACHINEGUN,
|
||||
WP_M3A1_SUBMACHINEGUN,
|
||||
WP_MP5,
|
||||
|
||||
// Primaries
|
||||
WP_USAS_12_SHOTGUN,
|
||||
WP_M4_ASSAULT_RIFLE,
|
||||
WP_AK74_ASSAULT_RIFLE,
|
||||
WP_SIG551,
|
||||
|
||||
WP_MSG90A1,
|
||||
WP_M60_MACHINEGUN,
|
||||
WP_MM1_GRENADE_LAUNCHER,
|
||||
WP_RPG7_LAUNCHER,
|
||||
|
||||
// Grenades
|
||||
WP_M67_GRENADE,
|
||||
WP_M84_GRENADE,
|
||||
WP_F1_GRENADE,
|
||||
WP_L2A2_GRENADE,
|
||||
WP_MDN11_GRENADE,
|
||||
WP_SMOHG92_GRENADE,
|
||||
WP_ANM14_GRENADE,
|
||||
WP_M15_GRENADE,
|
||||
|
@ -103,14 +104,14 @@ typedef enum
|
|||
AMMO_40,
|
||||
AMMO_RPG7,
|
||||
AMMO_M15,
|
||||
AMMO_M67,
|
||||
AMMO_M84,
|
||||
AMMO_F1,
|
||||
AMMO_L2A2,
|
||||
AMMO_MDN11,
|
||||
AMMO_SMOHG92,
|
||||
AMMO_ANM14,
|
||||
|
||||
AMMO_762_BELT,
|
||||
|
||||
AMMO_MP5_9,
|
||||
|
||||
AMMO_MAX,
|
||||
|
||||
AMMO_NONE,
|
||||
|
@ -145,6 +146,16 @@ typedef enum
|
|||
|
||||
} ECategory;
|
||||
|
||||
#define MAX_ZOOMNAME 8
|
||||
#define ZOOMLEVEL_MAX 3
|
||||
|
||||
typedef struct zoomData_s
|
||||
{
|
||||
int fov;
|
||||
char name[MAX_ZOOMNAME];
|
||||
|
||||
} zoomData_t;
|
||||
|
||||
typedef struct attackData_s
|
||||
{
|
||||
char name[MAX_QPATH];
|
||||
|
@ -165,6 +176,7 @@ typedef struct attackData_s
|
|||
int fireFromClip; // 0 = fire from approp. ammo pool, 1 = fire from clip
|
||||
int damage; // how much damage is done per hit
|
||||
float inaccuracy; // how inaccurate is weapon
|
||||
float zoomInaccuracy; // how inaccurate is the weapon when zoomed
|
||||
float maxInaccuracy; // maximum lvl of inaccuracy
|
||||
int pellets; // how many individual 'bullets' are shot with one trigger pull?
|
||||
int weaponFlags; // which fire modes are available, projectiles timed or impact, .etc
|
||||
|
@ -212,6 +224,7 @@ typedef struct weaponData_s
|
|||
|
||||
attackData_t attack[ATTACK_MAX];
|
||||
|
||||
zoomData_t zoom[ZOOMLEVEL_MAX];
|
||||
|
||||
} weaponData_t;
|
||||
|
||||
|
@ -355,7 +368,7 @@ extern TWeaponParseInfo weaponParseInfo[WP_NUM_WEAPONS];
|
|||
extern char weaponLeftHand[MAX_QPATH];
|
||||
extern char weaponRightHand[MAX_QPATH];
|
||||
|
||||
qboolean BG_ParseInviewFile ( void);
|
||||
qboolean BG_ParseInviewFile ( qboolean );
|
||||
TAnimWeapon* BG_GetInviewAnim ( int weaponIdx,const char *animKey,int *animIndex);
|
||||
TAnimWeapon* BG_GetInviewAnimFromIndex ( int weaponIdx,int animIndex);
|
||||
TAnimInfoWeapon* BG_GetInviewModelAnim ( int weaponIdx,const char *modelKey,const char *animKey);
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "g_local.h"
|
||||
|
||||
|
||||
void P_SetTwitchInfo(gclient_t *client)
|
||||
{
|
||||
client->ps.painTime = level.time;
|
||||
|
@ -155,7 +156,7 @@ G_SetClientSound
|
|||
*/
|
||||
void G_SetClientSound( gentity_t *ent )
|
||||
{
|
||||
ent->client->ps.loopSound = 0;
|
||||
// ent->client->ps.loopSound = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -286,6 +287,8 @@ void G_TouchTriggers( gentity_t *ent )
|
|||
|
||||
// Reset the players can use flag
|
||||
ent->client->ps.pm_flags &= ~(PMF_CAN_USE);
|
||||
ent->client->useEntity = 0;
|
||||
ent->client->ps.loopSound = 0;
|
||||
ent->s.modelindex = 0;
|
||||
|
||||
for ( i=0 ; i<num ; i++ )
|
||||
|
@ -311,6 +314,45 @@ void G_TouchTriggers( gentity_t *ent )
|
|||
continue;
|
||||
}
|
||||
|
||||
// Look for usable gametype triggers and you cant use when zoomed
|
||||
if ( !(ent->client->ps.pm_flags & PMF_ZOOMED ) )
|
||||
{
|
||||
switch ( hit->s.eType )
|
||||
{
|
||||
case ET_GAMETYPE_TRIGGER:
|
||||
if ( hit->use && trap_GT_SendEvent ( GTEV_TRIGGER_CANBEUSED, level.time, hit->health, ent->s.number, ent->client->sess.team, 0, 0 ) )
|
||||
{
|
||||
ent->client->ps.pm_flags |= PMF_CAN_USE;
|
||||
ent->client->ps.stats[STAT_USEICON] = hit->delay;
|
||||
ent->client->ps.stats[STAT_USETIME_MAX] = hit->soundPos1;
|
||||
|
||||
if ( ent->client->ps.stats[STAT_USETIME] )
|
||||
{
|
||||
ent->client->ps.loopSound = hit->soundLoop;
|
||||
}
|
||||
ent->client->useEntity = hit;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
||||
case ET_ITEM:
|
||||
if ( hit->item->giType == IT_GAMETYPE && trap_GT_SendEvent ( GTEV_ITEM_CANBEUSED, level.time, hit->item->quantity, ent->s.number, ent->client->sess.team, 0, 0 ) )
|
||||
{
|
||||
ent->client->ps.pm_flags |= PMF_CAN_USE;
|
||||
ent->client->ps.stats[STAT_USEICON] = level.gametypeItems[hit->item->giTag].useIcon;
|
||||
ent->client->ps.stats[STAT_USETIME_MAX] = level.gametypeItems[hit->item->giTag].useTime;
|
||||
|
||||
if ( ent->client->ps.stats[STAT_USETIME] )
|
||||
{
|
||||
ent->client->ps.loopSound = level.gametypeItems[hit->item->giTag].useSound;
|
||||
}
|
||||
ent->client->useEntity = hit;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !hit->touch && !ent->touch )
|
||||
{
|
||||
continue;
|
||||
|
@ -457,6 +499,9 @@ void G_UpdatePlayerStateScores ( gentity_t* ent )
|
|||
{
|
||||
ent->client->ps.persistant[PERS_RED_SCORE] = level.teamScores[TEAM_RED];
|
||||
ent->client->ps.persistant[PERS_BLUE_SCORE] = level.teamScores[TEAM_BLUE];
|
||||
|
||||
ent->client->ps.persistant[PERS_BLUE_ALIVE_COUNT] = level.teamAliveCount[TEAM_BLUE];
|
||||
ent->client->ps.persistant[PERS_RED_ALIVE_COUNT] = level.teamAliveCount[TEAM_RED];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -494,6 +539,7 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd )
|
|||
{
|
||||
client->ps.pm_type = PM_SPECTATOR;
|
||||
client->ps.speed = 400; // faster than normal
|
||||
client->ps.loopSound = 0;
|
||||
|
||||
// set up for pmove
|
||||
memset (&pm, 0, sizeof(pm));
|
||||
|
@ -523,6 +569,11 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd )
|
|||
// attack button cycles through spectators
|
||||
if ( client->sess.spectatorState != SPECTATOR_FOLLOW && g_forceFollow.integer )
|
||||
{
|
||||
if ( g_forceFollow.integer > 1 )
|
||||
{
|
||||
client->sess.spectatorFirstPerson = qtrue;
|
||||
}
|
||||
|
||||
Cmd_FollowCycle_f( ent, 1 );
|
||||
}
|
||||
if ( ( client->buttons & BUTTON_ATTACK ) && ! ( client->oldbuttons & BUTTON_ATTACK ) )
|
||||
|
@ -537,6 +588,28 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd )
|
|||
{
|
||||
G_StopFollowing( ent );
|
||||
}
|
||||
else if ( (client->buttons & BUTTON_USE) && !( client->oldbuttons & BUTTON_USE ) )
|
||||
{
|
||||
// If not following then go to either third or first
|
||||
if ( client->sess.spectatorState != SPECTATOR_FOLLOW )
|
||||
{
|
||||
client->sess.spectatorFirstPerson = g_forceFollow.integer < 2 ? qfalse : qtrue;
|
||||
Cmd_FollowCycle_f( ent, -1 );
|
||||
}
|
||||
// If in first person then either go to free float or third person
|
||||
else if ( client->sess.spectatorFirstPerson )
|
||||
{
|
||||
if ( g_forceFollow.integer < 2 )
|
||||
{
|
||||
client->sess.spectatorFirstPerson = qfalse;
|
||||
}
|
||||
}
|
||||
// Must be in third person so just go to first
|
||||
else
|
||||
{
|
||||
client->sess.spectatorFirstPerson = qtrue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -621,6 +694,10 @@ ClientIntermissionThink
|
|||
*/
|
||||
void ClientIntermissionThink( gclient_t *client )
|
||||
{
|
||||
G_UpdatePlayerStateScores ( &g_entities[client->ps.clientNum] );
|
||||
|
||||
client->ps.loopSound = 0;
|
||||
|
||||
client->ps.eFlags &= ~EF_TALK;
|
||||
client->ps.eFlags &= ~EF_FIRING;
|
||||
|
||||
|
@ -646,48 +723,30 @@ use key pressed
|
|||
*/
|
||||
void G_Use ( gentity_t* ent )
|
||||
{
|
||||
int i;
|
||||
int num;
|
||||
int touch[MAX_GENTITIES];
|
||||
gentity_t *hit;
|
||||
vec3_t mins;
|
||||
vec3_t maxs;
|
||||
static vec3_t range = { 20, 20, 40 };
|
||||
|
||||
if ( !ent->client )
|
||||
if ( !ent->client->useEntity )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// dead clients don't activate triggers!
|
||||
if ( ent->client->ps.stats[STAT_HEALTH] <= 0 ) {
|
||||
if ( ent->client->useEntity->s.eType == ET_ITEM )
|
||||
{
|
||||
// Make sure one last time that it can still be used
|
||||
if ( !trap_GT_SendEvent ( GTEV_ITEM_CANBEUSED, level.time, ent->client->useEntity->item->quantity, ent->s.number, ent->client->sess.team, 0, 0 ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
VectorSubtract( ent->client->ps.origin, range, mins );
|
||||
VectorAdd( ent->client->ps.origin, range, maxs );
|
||||
|
||||
num = trap_EntitiesInBox( mins, maxs, touch, MAX_GENTITIES );
|
||||
|
||||
// can't use ent->r.absmin, because that has a one unit pad
|
||||
VectorAdd( ent->client->ps.origin, ent->r.mins, mins );
|
||||
VectorAdd( ent->client->ps.origin, ent->r.maxs, maxs );
|
||||
|
||||
for ( i=0 ; i<num ; i++ )
|
||||
{
|
||||
hit = &g_entities[touch[i]];
|
||||
|
||||
if ( !hit->use )
|
||||
{
|
||||
continue;
|
||||
gametype_item_use ( ent->client->useEntity, ent );
|
||||
return;
|
||||
}
|
||||
|
||||
// Misstion triggers can be used
|
||||
if ( !Q_stricmp ( hit->classname, "gametype_trigger" ) )
|
||||
// Make double sure it can still be used
|
||||
if ( !trap_GT_SendEvent ( GTEV_TRIGGER_CANBEUSED, level.time, ent->client->useEntity->health, ent->s.number, ent->client->sess.team, 0, 0 ) )
|
||||
{
|
||||
hit->use ( hit, ent, ent );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
ent->client->useEntity->use ( ent->client->useEntity, ent, ent );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -976,6 +1035,7 @@ void ClientThink_real( gentity_t *ent )
|
|||
pm.cmd = *ucmd;
|
||||
if ( pm.ps->pm_type == PM_DEAD )
|
||||
{
|
||||
pm.ps->loopSound = 0;
|
||||
pm.tracemask = MASK_PLAYERSOLID & ~CONTENTS_BODY;
|
||||
}
|
||||
else if ( client->siameseTwin )
|
||||
|
@ -1072,6 +1132,15 @@ void ClientThink_real( gentity_t *ent )
|
|||
// Update the client animation info
|
||||
G_UpdateClientAnimations ( ent );
|
||||
|
||||
if ( ent->client->ps.pm_flags & PMF_LEANING )
|
||||
{
|
||||
ent->r.svFlags |= SVF_LINKHACK;
|
||||
}
|
||||
else
|
||||
{
|
||||
ent->r.svFlags &= ~SVF_LINKHACK;
|
||||
}
|
||||
|
||||
// link entity now, after any personal teleporters have been used
|
||||
trap_LinkEntity (ent);
|
||||
if ( !ent->client->noclip )
|
||||
|
@ -1136,6 +1205,9 @@ because they killed too many teammates
|
|||
*/
|
||||
void G_CheckClientTeamkill ( gentity_t* ent )
|
||||
{
|
||||
char userinfo[MAX_INFO_STRING];
|
||||
char *value;
|
||||
|
||||
if ( !g_teamkillDamageMax.integer || !level.gametypeData->teams || !ent->client->sess.teamkillDamage )
|
||||
{
|
||||
return;
|
||||
|
@ -1164,12 +1236,39 @@ void G_CheckClientTeamkill ( gentity_t* ent )
|
|||
return;
|
||||
}
|
||||
|
||||
trap_GetUserinfo( ent->s.number, userinfo, sizeof( userinfo ) );
|
||||
value = Info_ValueForKey (userinfo, "ip");
|
||||
|
||||
G_LogPrintf( "ClientKick: %i %s - auto kick for teamkilling\n", ent->s.number, value );
|
||||
|
||||
ent->client->sess.teamkillDamage = 0;
|
||||
ent->client->sess.teamkillForgiveTime = 0;
|
||||
|
||||
// Keep track of who was autokicked so we can display a list if need be
|
||||
Com_sprintf ( level.autokickedIP[level.autokickedHead], sizeof(level.autokickedIP[0]), value );
|
||||
Com_sprintf ( level.autokickedName[level.autokickedHead], sizeof(level.autokickedName[0]), ent->client->pers.netname );
|
||||
level.autokickedCount++;
|
||||
if ( level.autokickedCount >= MAX_AUTOKICKLIST )
|
||||
{
|
||||
level.autokickedCount = MAX_AUTOKICKLIST;
|
||||
}
|
||||
|
||||
level.autokickedHead++;
|
||||
if ( level.autokickedHead >= MAX_AUTOKICKLIST )
|
||||
{
|
||||
level.autokickedHead = 0;
|
||||
}
|
||||
|
||||
// Buh bye
|
||||
if ( g_teamkillBanTime.integer )
|
||||
{
|
||||
trap_SendConsoleCommand( EXEC_INSERT, va("banclient \"%d\" \"%d\" \"team killing\"\n", ent->s.number, g_teamkillBanTime.integer ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
trap_SendConsoleCommand( EXEC_INSERT, va("clientkick \"%d\" \"team killing\"\n", ent->s.number ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
|
@ -1287,17 +1386,24 @@ void SpectatorClientEndFrame( gentity_t *ent )
|
|||
{
|
||||
int count;
|
||||
int ping;
|
||||
int score;
|
||||
int respawnTimer;
|
||||
|
||||
count = ent->client->ps.persistant[PERS_SPAWN_COUNT];
|
||||
ping = ent->client->ps.ping;
|
||||
score = ent->client->ps.persistant[PERS_SCORE];
|
||||
flags = (cl->ps.eFlags & ~(EF_VOTED)) | (ent->client->ps.eFlags & (EF_VOTED));
|
||||
respawnTimer = ent->client->ps.respawnTimer;
|
||||
|
||||
ent->client->ps = cl->ps;
|
||||
ent->client->ps.pm_flags |= PMF_FOLLOW;
|
||||
if ( ent->client->sess.spectatorFirstPerson )
|
||||
{
|
||||
ent->client->ps.pm_flags |= PMF_FOLLOWFIRST;
|
||||
}
|
||||
ent->client->ps.eFlags = flags;
|
||||
ent->client->ps.persistant[PERS_SPAWN_COUNT] = count;
|
||||
ent->client->ps.persistant[PERS_SCORE] = score;
|
||||
ent->client->ps.ping = ping;
|
||||
ent->client->ps.respawnTimer = respawnTimer;
|
||||
|
||||
|
|
|
@ -232,15 +232,17 @@ void G_UndoAntiLag ( void )
|
|||
continue;
|
||||
}
|
||||
|
||||
if ( other->r.svFlags & SVF_DOUBLED_BBOX )
|
||||
if ( other->r.svFlags & SVF_INFLATED_BBOX )
|
||||
{
|
||||
// Put the hitbox back the way it was
|
||||
other->r.maxs[0] /= 2;
|
||||
other->r.maxs[1] /= 2;
|
||||
other->r.mins[0] /= 2;
|
||||
other->r.mins[1] /= 2;
|
||||
other->r.maxs[0] = other->client->maxSave[0];
|
||||
other->r.maxs[1] = other->client->maxSave[1];
|
||||
other->r.maxs[2] = other->client->maxSave[2];
|
||||
|
||||
other->r.svFlags &= (~SVF_DOUBLED_BBOX);
|
||||
other->r.mins[0] = other->client->minSave[0];
|
||||
other->r.mins[1] = other->client->minSave[1];
|
||||
|
||||
other->r.svFlags &= (~SVF_INFLATED_BBOX);
|
||||
}
|
||||
|
||||
G_UndoClientAntiLag ( other );
|
||||
|
@ -304,13 +306,37 @@ void G_ApplyAntiLag ( gentity_t* ref, qboolean enlargeHitBox )
|
|||
|
||||
if ( enlargeHitBox )
|
||||
{
|
||||
other->client->minSave[0] = other->r.mins[0];
|
||||
other->client->minSave[1] = other->r.mins[1];
|
||||
|
||||
other->client->maxSave[0] = other->r.maxs[0];
|
||||
other->client->maxSave[1] = other->r.maxs[1];
|
||||
other->client->maxSave[2] = other->r.maxs[2];
|
||||
|
||||
if ( other->client->ps.pm_flags & PMF_DUCKED )
|
||||
{
|
||||
other->r.maxs[2] += 10;
|
||||
}
|
||||
|
||||
// Adjust the hit box to account for hands and such
|
||||
// that are sticking out of the normal bounding box
|
||||
other->r.maxs[0] *= 2;
|
||||
other->r.maxs[1] *= 2;
|
||||
other->r.mins[0] *= 2;
|
||||
other->r.mins[1] *= 2;
|
||||
other->r.svFlags |= SVF_DOUBLED_BBOX;
|
||||
|
||||
if ( other->client->ps.pm_flags & PMF_LEANING )
|
||||
{
|
||||
other->r.maxs[0] *= 3.0f;
|
||||
other->r.maxs[1] *= 3.0f;
|
||||
other->r.mins[0] *= 3.0f;
|
||||
other->r.mins[1] *= 3.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
other->r.maxs[0] *= 2.0f;
|
||||
other->r.maxs[1] *= 2.0f;
|
||||
other->r.mins[0] *= 2.0f;
|
||||
other->r.mins[1] *= 2.0f;
|
||||
}
|
||||
|
||||
other->r.svFlags |= SVF_INFLATED_BBOX;
|
||||
}
|
||||
|
||||
// Relink the entity into the world
|
||||
|
|
|
@ -182,6 +182,23 @@ const char *G_GetArenaInfoByMap( const char *map )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
G_DoesMapExist
|
||||
|
||||
determines whether or not the given map exists on the server
|
||||
===============
|
||||
*/
|
||||
qboolean G_DoesMapExist ( const char* mapname )
|
||||
{
|
||||
if ( G_GetArenaInfoByMap ( mapname ) )
|
||||
{
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
G_DoesMapSupportGametype
|
||||
|
|
|
@ -176,7 +176,9 @@ gspawn_t* G_SelectRandomSpawnPoint ( team_t team )
|
|||
return tfspawns[ rand() % tfcount ];
|
||||
}
|
||||
|
||||
return spawns[ rand() % count ];
|
||||
i = rand() % count;
|
||||
|
||||
return spawns[ i ];
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -736,6 +738,8 @@ void G_ClientCleanName ( const char *in, char *out, int outSize, qboolean colors
|
|||
break;
|
||||
}
|
||||
|
||||
if ( *in != Q_COLOR_ESCAPE )
|
||||
{
|
||||
// don't allow black in a name, period
|
||||
if( !colors || ColorIndex(*in) == 0 )
|
||||
{
|
||||
|
@ -754,6 +758,14 @@ void G_ClientCleanName ( const char *in, char *out, int outSize, qboolean colors
|
|||
len += 2;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
*out++ = ch;
|
||||
*out++ = ch;
|
||||
in++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// don't allow too many consecutive spaces
|
||||
if( ch == ' ' )
|
||||
|
@ -880,6 +892,11 @@ void G_UpdateOutfitting ( int clientNum )
|
|||
}
|
||||
}
|
||||
|
||||
// Disable zooming
|
||||
client->ps.zoomFov = 0;
|
||||
client->ps.zoomTime = 0;
|
||||
client->ps.pm_flags &= ~(PMF_ZOOM_FLAGS);
|
||||
|
||||
client->ps.weapon = equipWeapon;
|
||||
client->ps.weaponstate = WEAPON_READY; //WEAPON_SPAWNING;
|
||||
client->ps.weaponTime = 0;
|
||||
|
@ -923,6 +940,34 @@ void G_UpdateOutfitting ( int clientNum )
|
|||
client->ps.stats[STAT_OUTFIT_GRENADE] = bg_itemlist[bg_outfittingGroups[OUTFITTING_GROUP_GRENADE][client->pers.outfitting.items[OUTFITTING_GROUP_GRENADE]]].giTag;
|
||||
}
|
||||
|
||||
/*
|
||||
===========
|
||||
G_FindClientByName
|
||||
|
||||
Looks up a player by its case insensitive name
|
||||
============
|
||||
*/
|
||||
gclient_t* G_FindClientByName ( const char* name, int ignoreNum )
|
||||
{
|
||||
int i;
|
||||
|
||||
for ( i = 0; i < level.numConnectedClients; i ++ )
|
||||
{
|
||||
gentity_t* ent = &g_entities[level.sortedClients[i]];
|
||||
|
||||
if ( level.sortedClients[i] == ignoreNum )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( Q_stricmp ( name, ent->client->pers.netname ) == 0 )
|
||||
{
|
||||
return ent->client;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
===========
|
||||
|
@ -944,6 +989,8 @@ void ClientUserinfoChanged( int clientNum )
|
|||
gclient_t *client;
|
||||
char oldname[MAX_STRING_CHARS];
|
||||
char userinfo[MAX_INFO_STRING];
|
||||
char origname[MAX_NETNAME];
|
||||
int namecount = 1;
|
||||
TIdentity *oldidentity;
|
||||
|
||||
ent = g_entities + clientNum;
|
||||
|
@ -1004,6 +1051,14 @@ void ClientUserinfoChanged( int clientNum )
|
|||
}
|
||||
}
|
||||
|
||||
// See if we need to find a new name because the one they chose is taken
|
||||
Q_strncpyz ( origname, client->pers.netname, MAX_NETNAME - 5 );
|
||||
while ( G_FindClientByName ( client->pers.netname, clientNum ) )
|
||||
{
|
||||
Com_sprintf ( client->pers.netname, MAX_NETNAME, "%s(%d)", origname, namecount );
|
||||
namecount++;
|
||||
}
|
||||
|
||||
// set max health
|
||||
health = atoi( Info_ValueForKey( userinfo, "handicap" ) );
|
||||
|
||||
|
@ -1164,23 +1219,25 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot )
|
|||
char *value;
|
||||
gclient_t *client;
|
||||
char userinfo[MAX_INFO_STRING];
|
||||
char ip[128];
|
||||
char guid[64];
|
||||
gentity_t *ent;
|
||||
|
||||
ent = &g_entities[ clientNum ];
|
||||
|
||||
trap_GetUserinfo( clientNum, userinfo, sizeof( userinfo ) );
|
||||
|
||||
value = Info_ValueForKey (userinfo, "cl_guid");
|
||||
Com_sprintf ( guid, sizeof(guid), value );
|
||||
|
||||
// check to see if they are on the banned IP list
|
||||
value = Info_ValueForKey (userinfo, "ip");
|
||||
if ( G_FilterPacket( value ) )
|
||||
{
|
||||
return "Banned.";
|
||||
}
|
||||
Com_sprintf ( ip, sizeof(ip), value );
|
||||
|
||||
// we don't check password for bots and local client
|
||||
// NOTE: local client <-> "ip" "localhost"
|
||||
// this means this client is not running in our current process
|
||||
if ( !( isBot ) && (strcmp(value, "localhost") != 0))
|
||||
if ( !( isBot ) && (strcmp(ip, "localhost") != 0))
|
||||
{
|
||||
// check for a password
|
||||
value = Info_ValueForKey (userinfo, "password");
|
||||
|
@ -1220,25 +1277,26 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot )
|
|||
}
|
||||
|
||||
// get and distribute relevent paramters
|
||||
G_LogPrintf( "ClientConnect: %i\n", clientNum );
|
||||
G_LogPrintf( "ClientConnect: %i - %s [%s]\n", clientNum, ip, guid );
|
||||
ClientUserinfoChanged( clientNum );
|
||||
|
||||
// don't do the "xxx connected" messages if they were caried over from previous level
|
||||
if ( firstTime )
|
||||
{
|
||||
trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " is connecting...\n\"", client->pers.netname) );
|
||||
}
|
||||
|
||||
// Broadcast team change if not going to spectator
|
||||
if ( level.gametypeData->teams && client->sess.team != TEAM_SPECTATOR )
|
||||
{
|
||||
BroadcastTeamChange( client, -1 );
|
||||
}
|
||||
}
|
||||
|
||||
// count current clients and rank for scoreboard
|
||||
CalculateRanks();
|
||||
|
||||
// Make sure they are unlinked
|
||||
ent->s.number = clientNum;
|
||||
trap_UnlinkEntity ( ent );
|
||||
|
||||
return NULL;
|
||||
|
@ -1310,6 +1368,17 @@ void ClientBegin( int clientNum )
|
|||
|
||||
G_LogPrintf( "ClientBegin: %i\n", clientNum );
|
||||
|
||||
// See if we should spawn as a ghost
|
||||
if ( client->sess.team != TEAM_SPECTATOR && level.gametypeData->respawnType == RT_NONE )
|
||||
{
|
||||
// If there are ghosts already then spawn as a ghost because
|
||||
// the game is already in progress.
|
||||
if ( !level.warmupTime && (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) )
|
||||
{
|
||||
G_StartGhosting ( ent );
|
||||
}
|
||||
}
|
||||
|
||||
// count current clients and rank for scoreboard
|
||||
CalculateRanks();
|
||||
}
|
||||
|
@ -1492,6 +1561,7 @@ void ClientSpawn(gentity_t *ent)
|
|||
VectorCopy (playerMaxs, ent->r.maxs);
|
||||
|
||||
client->ps.clientNum = index;
|
||||
ent->s.number = index;
|
||||
|
||||
// Bring back the saved firemodes
|
||||
memcpy ( client->ps.firemode, client->pers.firemode, sizeof(client->ps.firemode) );
|
||||
|
@ -1504,7 +1574,7 @@ void ClientSpawn(gentity_t *ent)
|
|||
// Give the client their weapons depending on whether or not pickups are enabled
|
||||
if ( level.pickupsDisabled )
|
||||
{
|
||||
G_UpdateOutfitting ( ent->s.number );
|
||||
G_UpdateOutfitting ( index );
|
||||
|
||||
// Prevent the client from picking up a whole bunch of stuff
|
||||
client->ps.pm_flags |= PMF_LIMITED_INVENTORY;
|
||||
|
@ -1597,6 +1667,10 @@ void ClientSpawn(gentity_t *ent)
|
|||
client->ps.torsoAnim = -1;
|
||||
client->ps.legsAnim = LEGS_IDLE;
|
||||
|
||||
client->ps.weaponAnimIdChoice = 0;
|
||||
client->ps.weaponCallbackStep = 0;
|
||||
client->ps.weaponCallbackTime = 0;
|
||||
|
||||
// Not on a ladder
|
||||
client->ps.ladder = -1;
|
||||
|
||||
|
@ -1608,6 +1682,12 @@ void ClientSpawn(gentity_t *ent)
|
|||
MoveClientToIntermission( ent );
|
||||
}
|
||||
|
||||
// Frozen?
|
||||
if ( level.gametypeDelayTime > level.time )
|
||||
{
|
||||
ent->client->ps.stats[STAT_FROZEN] = level.gametypeDelayTime - level.time;
|
||||
}
|
||||
|
||||
// run a client frame to drop exactly to the floor,
|
||||
// initialize animations and other things
|
||||
client->ps.commandTime = level.time - 100;
|
||||
|
@ -1628,12 +1708,6 @@ void ClientSpawn(gentity_t *ent)
|
|||
// clear entity state values
|
||||
BG_PlayerStateToEntityState( &client->ps, &ent->s, qtrue );
|
||||
|
||||
// Frozen?
|
||||
if ( level.gametypeDelayTime > level.time )
|
||||
{
|
||||
ent->client->ps.stats[STAT_FROZEN] = level.gametypeDelayTime - level.time;
|
||||
}
|
||||
|
||||
// Handle a deferred name change
|
||||
if ( client->pers.deferredname[0] )
|
||||
{
|
||||
|
@ -1839,3 +1913,51 @@ gentity_t* G_FindNearbyClient ( vec3_t origin, team_t team, float radius, gentit
|
|||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
===========
|
||||
G_IgnoreClientChat
|
||||
|
||||
Instructs all chat to be ignored by the given
|
||||
============
|
||||
*/
|
||||
void G_IgnoreClientChat ( int ignorer, int ignoree, qboolean ignore )
|
||||
{
|
||||
// Cant ignore yourself
|
||||
if ( ignorer == ignoree )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// If there is no client connected then dont bother
|
||||
if ( g_entities[ignoree].client->pers.connected != CON_CONNECTED )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ignore )
|
||||
{
|
||||
g_entities[ignoree].client->sess.chatIgnoreClients[ignorer/32] |= (1<<(ignorer%32));
|
||||
}
|
||||
else
|
||||
{
|
||||
g_entities[ignoree].client->sess.chatIgnoreClients[ignorer/32] &= ~(1<<(ignorer%32));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
===========
|
||||
G_IsClientChatIgnored
|
||||
|
||||
Checks to see if the given client is being ignored by a specific client
|
||||
============
|
||||
*/
|
||||
qboolean G_IsClientChatIgnored ( int ignorer, int ignoree )
|
||||
{
|
||||
if ( g_entities[ignoree].client->sess.chatIgnoreClients[ignorer/32] & (1<<(ignorer%32)) )
|
||||
{
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
return qfalse;
|
||||
}
|
||||
|
|
|
@ -261,6 +261,36 @@ void Cmd_Drop_f ( gentity_t* ent )
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
Cmd_DropItem_f
|
||||
|
||||
Drops the gametype items the player is carrying
|
||||
==================
|
||||
*/
|
||||
void Cmd_DropItem_f ( gentity_t* ent )
|
||||
{
|
||||
// spectators cant drop anything since they dont have anything
|
||||
if ( ent->client->sess.team == TEAM_SPECTATOR )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Ghosts and followers cant drop stuff
|
||||
if ( ent->client->ps.pm_flags & (PMF_GHOST|PMF_FOLLOW) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Nothing to drop
|
||||
if ( !ent->client->ps.stats[STAT_GAMETYPE_ITEMS] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
G_DropGametypeItems ( ent, 3000 );
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
Cmd_Give_f
|
||||
|
@ -723,6 +753,9 @@ void SetTeam( gentity_t *ent, char *s, const char* identity )
|
|||
client->sess.spectatorState = specState;
|
||||
client->sess.spectatorClient = specClient;
|
||||
|
||||
// Kill any child entities of this client to protect against grenade team changers
|
||||
G_FreeEnitityChildren ( ent );
|
||||
|
||||
// Always spawn into a ctf game using a respawn timer.
|
||||
if ( team != TEAM_SPECTATOR && level.gametypeData->respawnType == RT_INTERVAL )
|
||||
{
|
||||
|
@ -737,7 +770,7 @@ void SetTeam( gentity_t *ent, char *s, const char* identity )
|
|||
{
|
||||
// If there are ghosts already then spawn as a ghost because
|
||||
// the game is already in progress.
|
||||
if ( (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > 20000) || noOutfittingChange || client->sess.noTeamChange )
|
||||
if ( !level.warmupTime && (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) || noOutfittingChange || client->sess.noTeamChange )
|
||||
{
|
||||
ghost = qtrue;
|
||||
}
|
||||
|
@ -868,23 +901,11 @@ void G_StopFollowing( gentity_t *ent )
|
|||
ent->client->sess.spectatorState = SPECTATOR_FREE;
|
||||
ent->client->ps.clientNum = ent - g_entities;
|
||||
ent->client->ps.zoomFov = 0;
|
||||
ent->client->ps.loopSound = 0;
|
||||
ent->client->ps.pm_flags &= ~(PMF_GOGGLES_ON|PMF_ZOOM_FLAGS);
|
||||
ent->client->ps.persistant[PERS_TEAM] = ent->client->sess.team;
|
||||
ent->r.svFlags &= ~SVF_BOT;
|
||||
|
||||
// Ghots dont really become spectators, just psuedo spectators
|
||||
if ( ent->client->sess.ghost )
|
||||
{
|
||||
// Do a start and stop to ensure the variables are all set properly
|
||||
G_StopGhosting ( ent );
|
||||
G_StartGhosting ( ent );
|
||||
}
|
||||
else
|
||||
{
|
||||
ent->client->sess.team = TEAM_SPECTATOR;
|
||||
ent->client->ps.persistant[ PERS_TEAM ] = TEAM_SPECTATOR;
|
||||
}
|
||||
|
||||
// If we were in fact following someone, then make the angles and origin nice for
|
||||
// when we stop
|
||||
if ( ent->client->sess.spectatorClient != -1 )
|
||||
|
@ -905,7 +926,18 @@ void G_StopFollowing( gentity_t *ent )
|
|||
BG_PlayerStateToEntityState( &ent->client->ps, &ent->s, qtrue );
|
||||
}
|
||||
|
||||
ent->client->sess.spectatorClient = -1;
|
||||
// Ghots dont really become spectators, just psuedo spectators
|
||||
if ( ent->client->sess.ghost )
|
||||
{
|
||||
// Do a start and stop to ensure the variables are all set properly
|
||||
G_StopGhosting ( ent );
|
||||
G_StartGhosting ( ent );
|
||||
}
|
||||
else
|
||||
{
|
||||
ent->client->sess.team = TEAM_SPECTATOR;
|
||||
ent->client->ps.persistant[ PERS_TEAM ] = TEAM_SPECTATOR;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1005,6 +1037,16 @@ void Cmd_Follow_f( gentity_t *ent )
|
|||
return;
|
||||
}
|
||||
|
||||
// Dissallow following of the enemy if the cvar is set
|
||||
if ( level.gametypeData->teams && !g_followEnemy.integer && ent->client->sess.team != TEAM_SPECTATOR )
|
||||
{
|
||||
// Are they on the same team?
|
||||
if ( level.clients[ i ].sess.team != ent->client->sess.team )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// first set them to spectator as long as they arent a ghost
|
||||
if ( !ent->client->sess.ghost && ent->client->sess.team != TEAM_SPECTATOR )
|
||||
{
|
||||
|
@ -1145,6 +1187,11 @@ static void G_SayTo( gentity_t *ent, gentity_t *other, int mode, const char *nam
|
|||
return;
|
||||
}
|
||||
|
||||
if ( ent->client->sess.muted || G_IsClientChatIgnored ( other->s.number, ent->s.number ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !level.intermissiontime && !level.intermissionQueued )
|
||||
{
|
||||
// Spectators cant talk to alive people
|
||||
|
@ -1295,7 +1342,7 @@ void G_Say ( gentity_t *ent, gentity_t *target, int mode, const char *chatText )
|
|||
int j;
|
||||
gentity_t *other;
|
||||
char text[MAX_SAY_TEXT];
|
||||
char name[64];
|
||||
char name[256];
|
||||
|
||||
// Logging stuff
|
||||
switch ( mode )
|
||||
|
@ -1655,6 +1702,7 @@ void Cmd_CallVote_f( gentity_t *ent )
|
|||
} else if ( !Q_stricmp( arg1, "kick" ) ) {
|
||||
} else if ( !Q_stricmp( arg1, "clientkick" ) ) {
|
||||
} else if ( !Q_stricmp( arg1, "g_doWarmup" ) ) {
|
||||
} else if ( !Q_stricmp( arg1, "g_friendlyfire" ) ) {
|
||||
} else if ( !Q_stricmp( arg1, "timelimit" ) ) {
|
||||
} else if ( !Q_stricmp( arg1, "timeextension" ) ) {
|
||||
} else if ( !Q_stricmp( arg1, "scorelimit" ) ) {
|
||||
|
@ -1695,6 +1743,12 @@ void Cmd_CallVote_f( gentity_t *ent )
|
|||
}
|
||||
else if ( !Q_stricmp( arg1, "map" ) )
|
||||
{
|
||||
if ( !G_DoesMapExist ( arg2 ) )
|
||||
{
|
||||
trap_SendServerCommand( ent-g_entities, "print \"Unknown mapname.\n\"" );
|
||||
return;
|
||||
}
|
||||
|
||||
Com_sprintf( level.voteString, sizeof( level.voteString ), "%s %s", arg1, arg2 );
|
||||
Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "%s", level.voteString );
|
||||
}
|
||||
|
@ -1707,13 +1761,13 @@ void Cmd_CallVote_f( gentity_t *ent )
|
|||
trap_Argv( 4, arg4, sizeof( arg4 ) );
|
||||
|
||||
Com_sprintf( level.voteString, sizeof( level.voteString ), "rmgmap 1 %s 2 %s 3 %s 4 \"%s\" 0", arg2, arg3, arg4, ConcatArgs ( 5 ) );
|
||||
Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "%s", level.voteString );
|
||||
Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "Randomly Generated Map" );
|
||||
}
|
||||
else if ( !Q_stricmp( arg1, "mapcycle" ) )
|
||||
{
|
||||
if (!*g_mapcycle.string || !Q_stricmp ( g_mapcycle.string, "none" ) )
|
||||
{
|
||||
trap_SendServerCommand( ent-g_entities, "print \"there is no map cycle ccurently set up.\n\"" );
|
||||
trap_SendServerCommand( ent-g_entities, "print \"there is no map cycle currently set up.\n\"" );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1736,7 +1790,15 @@ void Cmd_CallVote_f( gentity_t *ent )
|
|||
return;
|
||||
}
|
||||
|
||||
Com_sprintf ( level.voteString, sizeof(level.voteString ), "%s %s", arg1, arg2 );
|
||||
if ( g_voteKickBanTime.integer )
|
||||
{
|
||||
Com_sprintf ( level.voteString, sizeof(level.voteString ), "banclient %s %d voted off server", arg2, g_voteKickBanTime.integer );
|
||||
}
|
||||
else
|
||||
{
|
||||
Com_sprintf ( level.voteString, sizeof(level.voteString ), "clientkick %s", arg2 );
|
||||
}
|
||||
|
||||
Com_sprintf ( level.voteDisplayString, sizeof(level.voteDisplayString), "kick %s", g_entities[n].client->pers.netname );
|
||||
}
|
||||
else if ( !Q_stricmp ( arg1, "kick" ) )
|
||||
|
@ -1749,7 +1811,15 @@ void Cmd_CallVote_f( gentity_t *ent )
|
|||
return;
|
||||
}
|
||||
|
||||
if ( g_voteKickBanTime.integer )
|
||||
{
|
||||
Com_sprintf ( level.voteString, sizeof(level.voteString ), "banclient %d %d voted off server", clientid, g_voteKickBanTime.integer );
|
||||
}
|
||||
else
|
||||
{
|
||||
Com_sprintf ( level.voteString, sizeof(level.voteString ), "clientkick %d", clientid );
|
||||
}
|
||||
|
||||
Com_sprintf ( level.voteDisplayString, sizeof(level.voteDisplayString), "kick %s", g_entities[clientid].client->pers.netname );
|
||||
}
|
||||
else if ( !Q_stricmp ( arg1, "timeextension" ) )
|
||||
|
@ -1765,9 +1835,19 @@ void Cmd_CallVote_f( gentity_t *ent )
|
|||
trap_SendServerCommand( ent-g_entities, va("print \"This server does not allow time extensions.\n\"") );
|
||||
return;
|
||||
}
|
||||
|
||||
Com_sprintf ( level.voteString, sizeof(level.voteString ), "extendtime %d", g_timeextension.integer );
|
||||
Com_sprintf ( level.voteDisplayString, sizeof(level.voteDisplayString), "extend timelimit by %d minutes", g_timeextension.integer );
|
||||
}
|
||||
else if ( !Q_stricmp ( arg1, "timelimit" ) ||
|
||||
!Q_stricmp ( arg1, "scorelimit" ) ||
|
||||
!Q_stricmp ( arg1, "map_restart" ) ||
|
||||
!Q_stricmp ( arg1, "g_doWarmup" ) ||
|
||||
!Q_stricmp ( arg1, "g_friendlyfire" ) )
|
||||
{
|
||||
Com_sprintf ( level.voteString, sizeof(level.voteString ), "%s %d", arg1, atoi(arg2) );
|
||||
Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "%s", level.voteString );
|
||||
}
|
||||
else
|
||||
{
|
||||
Com_sprintf( level.voteString, sizeof( level.voteString ), "%s \"%s\"", arg1, arg2 );
|
||||
|
@ -1842,6 +1922,39 @@ void Cmd_Vote_f( gentity_t *ent )
|
|||
// for players entering or leaving
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
Cmd_Ignore_f
|
||||
=================
|
||||
*/
|
||||
void Cmd_Ignore_f( gentity_t *ent )
|
||||
{
|
||||
char buffer[MAX_TOKEN_CHARS];
|
||||
int ignoree;
|
||||
qboolean ignore;
|
||||
|
||||
trap_Argv( 1, buffer, sizeof( buffer ) );
|
||||
|
||||
ignoree = atoi( buffer );
|
||||
ignore = G_IsClientChatIgnored ( ent->s.number, ignoree ) ? qfalse : qtrue;
|
||||
|
||||
if ( ignoree == ent->s.number )
|
||||
{
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"cant ignore yourself.\n\""));
|
||||
return;
|
||||
}
|
||||
|
||||
G_IgnoreClientChat ( ent->s.number, ignoree, ignore);
|
||||
|
||||
if ( ignore )
|
||||
{
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"%s ignored.\n\"", g_entities[ignoree].client->pers.netname));
|
||||
}
|
||||
else
|
||||
{
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"%s unignored.\n\"", g_entities[ignoree].client->pers.netname));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -1944,6 +2057,8 @@ void ClientCommand( int clientNum ) {
|
|||
|
||||
if ( Q_stricmp ( cmd, "drop" ) == 0 )
|
||||
Cmd_Drop_f ( ent );
|
||||
else if (Q_stricmp (cmd, "dropitem" ) == 0 )
|
||||
Cmd_DropItem_f ( ent );
|
||||
else if (Q_stricmp (cmd, "give") == 0)
|
||||
Cmd_Give_f (ent);
|
||||
else if (Q_stricmp (cmd, "god") == 0)
|
||||
|
@ -1970,6 +2085,8 @@ void ClientCommand( int clientNum ) {
|
|||
Cmd_Vote_f (ent);
|
||||
else if (Q_stricmp (cmd, "setviewpos") == 0)
|
||||
Cmd_SetViewpos_f( ent );
|
||||
else if (Q_stricmp ( cmd, "ignore" ) == 0 )
|
||||
Cmd_Ignore_f ( ent );
|
||||
|
||||
#ifdef _SOF2_BOTS
|
||||
else if (Q_stricmp (cmd, "addbot") == 0)
|
||||
|
|
|
@ -41,11 +41,7 @@ Toss the weapon and custom gametype items for the killed player
|
|||
*/
|
||||
void TossClientItems( gentity_t *self )
|
||||
{
|
||||
gitem_t *item;
|
||||
int weapon;
|
||||
float angle;
|
||||
int i;
|
||||
gentity_t *drop;
|
||||
|
||||
// drop the weapon if not a gauntlet or machinegun
|
||||
weapon = self->s.weapon;
|
||||
|
@ -71,36 +67,7 @@ void TossClientItems( gentity_t *self )
|
|||
G_DropWeapon ( self, weapon, 0 );
|
||||
}
|
||||
|
||||
// drop all custom gametype items
|
||||
angle = 45;
|
||||
for ( i = 0 ; i < MAX_GAMETYPE_ITEMS ; i++ )
|
||||
{
|
||||
// skip this gametype item if the client doenst have it
|
||||
if ( !(self->client->ps.stats[STAT_GAMETYPE_ITEMS] & (1<<i)) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
item = BG_FindGametypeItem ( i );
|
||||
if ( !item )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
drop = G_DropItem( self, item, angle );
|
||||
drop->count = 1;
|
||||
angle += 45;
|
||||
|
||||
// TAke it away from the client just in case
|
||||
self->client->ps.stats[STAT_GAMETYPE_ITEMS] &= ~(1<<i);
|
||||
|
||||
if ( self->enemy && self->enemy->client && !OnSameTeam ( self->enemy, self ) )
|
||||
{
|
||||
trap_GT_SendEvent ( GTEV_ITEM_DEFEND, level.time, item->quantity, self->enemy->s.clientNum, self->enemy->client->sess.team, 0, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
self->client->ps.stats[STAT_GAMETYPE_ITEMS] = 0;
|
||||
G_DropGametypeItems ( self, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -148,24 +115,23 @@ char *modNames[] =
|
|||
|
||||
"MOD_M1911A1_PISTOL",
|
||||
"MOD_US_SOCOM_PISTOL",
|
||||
"MOD_SILVER_TALON",
|
||||
|
||||
"MOD_M590_SHOTGUN",
|
||||
"MOD_MICRO_UZI_SUBMACHINEGUN",
|
||||
"MOD_M3A1_SUBMACHINEGUN",
|
||||
"MOD_MP5",
|
||||
|
||||
"MOD_USAS_12_SHOTGUN",
|
||||
"MOD_M4_ASSAULT_RIFLE",
|
||||
"MOD_AK74_ASSAULT_RIFLE",
|
||||
"MOD_SIG551",
|
||||
"MOD_MSG90A1_SNIPER_RIFLE",
|
||||
"MOD_M60_MACHINEGUN",
|
||||
"MOD_MM1_GRENADE_LAUNCHER",
|
||||
"MOD_RPG7_LAUNCHER",
|
||||
|
||||
"MOD_M67_GRENADE",
|
||||
"MOD_M84_GRENADE",
|
||||
"MOD_F1_GRENADE",
|
||||
"MOD_L2A2_GRENADE",
|
||||
"MOD_MDN11_GRENADE",
|
||||
"MOD_SMOHG92_GRENADE",
|
||||
"MOD_ANM14_GRENADE",
|
||||
"MOD_M15_GRENADE",
|
||||
|
@ -177,7 +143,8 @@ char *modNames[] =
|
|||
"MOD_SUICIDE",
|
||||
"MOD_TEAMCHANGE",
|
||||
"MOD_TARGET_LASER",
|
||||
"MOD_TRIGGER_HURT"
|
||||
"MOD_TRIGGER_HURT",
|
||||
"MOD_TRIGGER_HURT_NOSUICIDE"
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -281,6 +248,12 @@ void player_die(
|
|||
{
|
||||
gentity_t* missile;
|
||||
missile = G_FireWeapon( self, ATTACK_NORMAL );
|
||||
|
||||
if ( attacker && attacker->client && attacker->client->sess.team != self->client->sess.team )
|
||||
{
|
||||
missile->dflags |= DAMAGE_NO_TEAMKILL;
|
||||
}
|
||||
|
||||
if ( missile )
|
||||
{
|
||||
VectorClear ( missile->s.pos.trDelta );
|
||||
|
@ -306,14 +279,14 @@ void player_die(
|
|||
|
||||
if ( attacker == self )
|
||||
{
|
||||
if ( mod != MOD_TEAMCHANGE )
|
||||
if ( mod != MOD_TEAMCHANGE && mod != MOD_TRIGGER_HURT_NOSUICIDE )
|
||||
{
|
||||
G_AddScore( attacker, g_suicidePenalty.integer );
|
||||
}
|
||||
}
|
||||
else if ( OnSameTeam ( self, attacker ) )
|
||||
{
|
||||
if ( mod != MOD_TELEFRAG )
|
||||
if ( mod != MOD_TELEFRAG && mod != MOD_TRIGGER_HURT_NOSUICIDE )
|
||||
{
|
||||
G_AddScore( attacker, g_teamkillPenalty.integer );
|
||||
}
|
||||
|
@ -326,7 +299,7 @@ void player_die(
|
|||
attacker->client->lastKillTime = level.time;
|
||||
}
|
||||
}
|
||||
else if ( mod != MOD_TEAMCHANGE )
|
||||
else if ( mod != MOD_TEAMCHANGE && mod != MOD_TRIGGER_HURT_NOSUICIDE )
|
||||
{
|
||||
G_AddScore( self, g_suicidePenalty.integer );
|
||||
}
|
||||
|
@ -361,7 +334,7 @@ void player_die(
|
|||
|
||||
// Let the gametype handle the problem, if it doenst handle it and return 1 then
|
||||
// just reset the gametype item
|
||||
if ( !trap_GT_SendEvent ( GTEV_ITEM_STUCK, level.time, item->quantity, 0, 0, 0, 0 ) )
|
||||
if ( !trap_GT_SendEvent ( GTEV_ITEM_STUCK, level.time, level.gametypeItems[item->giTag].id, 0, 0, 0, 0 ) )
|
||||
{
|
||||
G_ResetGametypeItem ( item );
|
||||
}
|
||||
|
@ -406,6 +379,7 @@ void player_die(
|
|||
self->client->ps.zoomFov = 0; // Turn off zooming when we die
|
||||
self->client->ps.stats[STAT_GAMETYPE_ITEMS] = 0;
|
||||
self->client->ps.pm_flags &= ~(PMF_GOGGLES_ON|PMF_ZOOM_FLAGS);
|
||||
self->client->ps.loopSound = 0;
|
||||
|
||||
self->s.angles[0] = 0;
|
||||
self->s.angles[2] = 0;
|
||||
|
@ -818,13 +792,6 @@ int G_Damage (
|
|||
}
|
||||
}
|
||||
|
||||
// the intermission has allready been qualified for, so don't
|
||||
// allow any extra scoring
|
||||
if ( level.intermissionQueued )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Cant change outfitting after being shot
|
||||
if ( targ->client )
|
||||
{
|
||||
|
@ -919,7 +886,7 @@ int G_Damage (
|
|||
// if the attacker was on the same team
|
||||
if ( targ != attacker && OnSameTeam (targ, attacker) )
|
||||
{
|
||||
if ( !g_friendlyFire.integer )
|
||||
if ( !g_friendlyFire.integer || level.warmupTime )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -951,24 +918,31 @@ int G_Damage (
|
|||
take -= asave;
|
||||
|
||||
// Teamkill dmage thats not caused by a telefrag?
|
||||
if ( g_teamkillDamageMax.integer && mod != MOD_TELEFRAG )
|
||||
if ( g_teamkillDamageMax.integer && mod != MOD_TELEFRAG && !(dflags&DAMAGE_NO_TEAMKILL) )
|
||||
{
|
||||
if ( level.gametypeData->teams && targ && attacker && targ != attacker )
|
||||
{
|
||||
// Hurt your own team?
|
||||
if ( OnSameTeam ( targ, attacker ) )
|
||||
{
|
||||
// Dont count more than one damage call per frame (grenades!)
|
||||
if ( level.time != attacker->client->sess.teamkillForgiveTime )
|
||||
{
|
||||
int actualtake = Com_Clamp ( 0, targ->health, take );
|
||||
|
||||
if ( targ->client->ps.stats[STAT_GAMETYPE_ITEMS] )
|
||||
{
|
||||
actualtake *= 2;
|
||||
}
|
||||
|
||||
// See if this damage falls into the no excuse damage
|
||||
if ( level.gametypeData->respawnType == RT_NONE && level.time - level.gametypeDelayTime < g_teamkillNoExcuseTime.integer * 1000 )
|
||||
{
|
||||
actualtake *= g_teamkillNoExcuseMultiplier.integer;
|
||||
}
|
||||
|
||||
attacker->client->sess.teamkillDamage += actualtake;
|
||||
attacker->client->sess.teamkillForgiveTime = level.time;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Output hits
|
||||
if ( g_logHits.integer && attacker && targ && attacker->client && targ->client )
|
||||
|
@ -1052,9 +1026,17 @@ int G_Damage (
|
|||
|
||||
if ( targ->health > 0 )
|
||||
{
|
||||
// 45 damage is full slowdown, so..
|
||||
float slowdown;
|
||||
|
||||
slowdown = (float)damage / 20.0f;
|
||||
slowdown = Com_Clampf ( 0.0f, 1.0f, slowdown );
|
||||
slowdown *= 0.75f;
|
||||
slowdown = 1.0f - slowdown;
|
||||
|
||||
// Slow down the client at bit when they get hit
|
||||
targ->client->ps.velocity[0] *= 0.25f;
|
||||
targ->client->ps.velocity[1] *= 0.25f;
|
||||
targ->client->ps.velocity[0] *= slowdown;
|
||||
targ->client->ps.velocity[1] *= slowdown;
|
||||
|
||||
// figure momentum add, even if the damage won't be taken
|
||||
if ( knockback )
|
||||
|
@ -1063,7 +1045,7 @@ int G_Damage (
|
|||
}
|
||||
|
||||
// Friendly fire
|
||||
if ( g_friendlyFire.integer && targ != attacker && OnSameTeam ( targ, attacker ) )
|
||||
if ( !level.warmupTime && g_friendlyFire.integer && targ != attacker && OnSameTeam ( targ, attacker ) )
|
||||
{
|
||||
vec3_t diff;
|
||||
|
||||
|
@ -1277,6 +1259,7 @@ qboolean G_RadiusDamage (
|
|||
float radius,
|
||||
gentity_t* ignore,
|
||||
int power,
|
||||
int dflags,
|
||||
int mod
|
||||
)
|
||||
{
|
||||
|
@ -1363,10 +1346,16 @@ qboolean G_RadiusDamage (
|
|||
location = G_MultipleDamageLocations ( location );
|
||||
}
|
||||
|
||||
d = G_Damage (ent, NULL, attacker, dir, origin, (int)points, DAMAGE_RADIUS|DAMAGE_NO_ARMOR, mod, location );
|
||||
d = G_Damage (ent, NULL, attacker, dir, origin, (int)points, DAMAGE_RADIUS|DAMAGE_NO_ARMOR|dflags, mod, location );
|
||||
|
||||
if ( d && ent->client )
|
||||
{
|
||||
// Only one of the grenade hits will count for tk damage
|
||||
if ( ent != attacker )
|
||||
{
|
||||
dflags |= DAMAGE_NO_TEAMKILL;
|
||||
}
|
||||
|
||||
// Put some procedural gore on the target.
|
||||
tent = G_TempEntity( origin, EV_EXPLOSION_HIT_FLESH );
|
||||
|
||||
|
@ -1378,7 +1367,7 @@ qboolean G_RadiusDamage (
|
|||
}
|
||||
else if (points >= 10)
|
||||
{ // dangerous weapon
|
||||
weapon = WP_M67_GRENADE;
|
||||
weapon = WP_SMOHG92_GRENADE;
|
||||
}
|
||||
else
|
||||
{ // Just a flesh wound
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
|
||||
#define MAX_GAMETYPE_SPAWN_POINTS 32
|
||||
|
||||
void hurt_use( gentity_t *self, gentity_t *other, gentity_t *activator );
|
||||
void target_effect_delayed_use ( gentity_t* self );
|
||||
|
||||
|
||||
int g_gametypeItemCount = 0;
|
||||
vec3_t g_effectOrigin;
|
||||
|
||||
|
@ -54,6 +58,10 @@ void SP_gametype_player ( gentity_t *ent )
|
|||
{
|
||||
team = TEAM_BLUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
team = TEAM_FREE;
|
||||
}
|
||||
}
|
||||
|
||||
G_AddClientSpawn ( ent, team );
|
||||
|
@ -68,12 +76,30 @@ void SP_mission_player ( gentity_t* ent )
|
|||
SP_gametype_player ( ent );
|
||||
}
|
||||
|
||||
void gametype_item_use ( gentity_t* self, gentity_t* other )
|
||||
{
|
||||
if ( level.gametypeResetTime )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( trap_GT_SendEvent ( GTEV_ITEM_USED, level.time, self->item->quantity, other->s.number, other->client->sess.team, 0, 0 ) )
|
||||
{
|
||||
G_UseTargets ( self, other );
|
||||
}
|
||||
}
|
||||
|
||||
void gametype_trigger_use ( gentity_t *self, gentity_t *other, gentity_t *activator )
|
||||
{
|
||||
if ( level.gametypeResetTime )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( trap_GT_SendEvent ( GTEV_TRIGGER_USED, level.time, self->health, other->s.number, other->client->sess.team, 0, 0 ) )
|
||||
{
|
||||
G_UseTargets ( self, other );
|
||||
}
|
||||
}
|
||||
|
||||
void gametype_trigger_touch ( gentity_t *self, gentity_t *other, trace_t *trace )
|
||||
|
@ -102,44 +128,47 @@ void SP_gametype_trigger ( gentity_t* ent )
|
|||
}
|
||||
|
||||
InitTrigger (ent);
|
||||
|
||||
ent->s.eType = ET_GAMETYPE_TRIGGER;
|
||||
}
|
||||
|
||||
static gentity_t* G_RealSpawnGametypeItem ( gentity_t* ent, qboolean dropped )
|
||||
static gentity_t* G_RealSpawnGametypeItem ( gitem_t* item, vec3_t origin, vec3_t angles, qboolean dropped )
|
||||
{
|
||||
gentity_t* it_ent;
|
||||
|
||||
it_ent = G_Spawn();
|
||||
|
||||
it_ent->flags |= FL_DROPPED_ITEM;
|
||||
it_ent->item = ent->item;
|
||||
it_ent->item = item;
|
||||
|
||||
VectorCopy( ent->r.currentOrigin, it_ent->s.origin );
|
||||
VectorCopy ( ent->s.angles, it_ent->s.apos.trBase );
|
||||
it_ent->classname = ent->item->classname;
|
||||
VectorCopy( origin, it_ent->s.origin );
|
||||
VectorCopy ( angles, it_ent->s.apos.trBase );
|
||||
VectorCopy ( angles, it_ent->s.angles );
|
||||
it_ent->classname = item->classname;
|
||||
G_SpawnItem ( it_ent, it_ent->item );
|
||||
FinishSpawningItem(it_ent);
|
||||
|
||||
VectorSet( it_ent->r.mins, -ITEM_RADIUS * 4 / 3, -ITEM_RADIUS * 4 / 3, -ITEM_RADIUS );
|
||||
VectorSet( it_ent->r.maxs, ITEM_RADIUS * 4 / 3, ITEM_RADIUS * 4 / 3, ITEM_RADIUS );
|
||||
|
||||
// Red team only
|
||||
if ( ent->s.eFlags & EF_REDTEAM )
|
||||
{
|
||||
it_ent->s.eFlags |= EF_REDTEAM;
|
||||
}
|
||||
|
||||
if ( ent->s.eFlags & EF_BLUETEAM )
|
||||
{
|
||||
it_ent->s.eFlags |= EF_BLUETEAM;
|
||||
}
|
||||
|
||||
return it_ent;
|
||||
}
|
||||
|
||||
gentity_t* G_SpawnGametypeItem ( const char* pickup_name, qboolean dropped )
|
||||
gentity_t* G_SpawnGametypeItem ( const char* pickup_name, qboolean dropped, vec3_t origin )
|
||||
{
|
||||
gentity_t* ent;
|
||||
|
||||
if ( dropped )
|
||||
{
|
||||
gitem_t* item = BG_FindItem ( pickup_name );
|
||||
if ( item )
|
||||
{
|
||||
return G_RealSpawnGametypeItem ( item, origin, vec3_origin, dropped );
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Look for the gametype item in the map
|
||||
ent = NULL;
|
||||
while ( NULL != (ent = G_Find ( ent, FOFS(classname), "gametype_item" ) ) )
|
||||
|
@ -158,12 +187,12 @@ gentity_t* G_SpawnGametypeItem ( const char* pickup_name, qboolean dropped )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
return G_RealSpawnGametypeItem ( ent, dropped );
|
||||
return G_RealSpawnGametypeItem ( ent->item, ent->r.currentOrigin, ent->s.angles, dropped );
|
||||
}
|
||||
|
||||
void G_GametypeItemThink ( gentity_t* ent )
|
||||
{
|
||||
G_RealSpawnGametypeItem ( ent, qfalse );
|
||||
G_RealSpawnGametypeItem ( ent->item, ent->r.currentOrigin, ent->s.angles, qfalse );
|
||||
}
|
||||
|
||||
/*QUAKED gametype_item (0 0 1) (-16 -16 -16) (16 16 16)
|
||||
|
@ -224,7 +253,7 @@ void G_ResetGametypeItem ( gitem_t* item )
|
|||
continue;
|
||||
}
|
||||
|
||||
G_RealSpawnGametypeItem ( find, qfalse );
|
||||
G_RealSpawnGametypeItem ( find->item, find->r.currentOrigin, find->s.angles, qfalse );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -256,7 +285,7 @@ void G_ResetGametypeEntities ( void )
|
|||
G_RespawnClients
|
||||
===============
|
||||
*/
|
||||
void G_RespawnClients ( qboolean force, team_t team )
|
||||
void G_RespawnClients ( qboolean force, team_t team, qboolean fullRestart )
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -310,6 +339,16 @@ void G_RespawnClients ( qboolean force, team_t team )
|
|||
|
||||
trap_UnlinkEntity (ent);
|
||||
ClientSpawn ( ent );
|
||||
|
||||
if ( fullRestart )
|
||||
{
|
||||
ent->client->sess.score = 0;
|
||||
ent->client->sess.kills = 0;
|
||||
ent->client->sess.deaths = 0;
|
||||
ent->client->sess.teamkillDamage = 0;
|
||||
ent->client->sess.teamkillForgiveTime = 0;
|
||||
ent->client->pers.enterTime = level.time;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -347,6 +386,18 @@ void G_ResetEntities ( void )
|
|||
{
|
||||
G_FreeEntity ( ent );
|
||||
}
|
||||
// func_wall's can be toggled off/on
|
||||
else if ( ent->s.eType == ET_WALL )
|
||||
{
|
||||
if ( ent->spawnflags & 1 )
|
||||
{
|
||||
trap_UnlinkEntity ( ent );
|
||||
}
|
||||
else
|
||||
{
|
||||
trap_LinkEntity ( ent );
|
||||
}
|
||||
}
|
||||
// If the dropped flag is set then free it
|
||||
else if ( ent->flags & FL_DROPPED_ITEM )
|
||||
{
|
||||
|
@ -361,6 +412,18 @@ void G_ResetEntities ( void )
|
|||
{
|
||||
G_FreeEntity ( ent );
|
||||
}
|
||||
else if ( ent->use == hurt_use )
|
||||
{
|
||||
if ( ent->spawnflags & 1 )
|
||||
{
|
||||
trap_UnlinkEntity ( ent );
|
||||
}
|
||||
}
|
||||
else if ( ent->think == target_effect_delayed_use )
|
||||
{
|
||||
ent->think = 0;
|
||||
ent->nextthink = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -369,7 +432,7 @@ void G_ResetEntities ( void )
|
|||
G_ResetGametype
|
||||
===============
|
||||
*/
|
||||
void G_ResetGametype ( void )
|
||||
void G_ResetGametype ( qboolean fullRestart )
|
||||
{
|
||||
gentity_t* tent;
|
||||
|
||||
|
@ -382,6 +445,13 @@ void G_ResetGametype ( void )
|
|||
// Reset the gametype itself
|
||||
G_ResetGametypeEntities ( );
|
||||
|
||||
// Cant have a 0 roundtimelimit
|
||||
if ( g_roundtimelimit.integer < 1 )
|
||||
{
|
||||
trap_Cvar_Set ( "g_roundtimelimit", "1" );
|
||||
trap_Cvar_Update ( &g_roundtimelimit );
|
||||
}
|
||||
|
||||
// Initialize the respawn interval since this is a interval gametype
|
||||
switch ( level.gametypeData->respawnType )
|
||||
{
|
||||
|
@ -393,7 +463,7 @@ void G_ResetGametype ( void )
|
|||
|
||||
case RT_NONE:
|
||||
level.gametypeDelayTime = level.time + g_roundstartdelay.integer * 1000;
|
||||
level.gametypeRoundTime = level.time + (g_roundtimelimit.integer * 60000);
|
||||
level.gametypeRoundTime = level.time + (g_roundtimelimit.integer * 60000) + g_roundstartdelay.integer * 1000;
|
||||
|
||||
if ( level.gametypeDelayTime != level.time )
|
||||
{
|
||||
|
@ -413,12 +483,21 @@ void G_ResetGametype ( void )
|
|||
}
|
||||
|
||||
// Respawn all clients
|
||||
G_RespawnClients ( qtrue, TEAM_RED );
|
||||
G_RespawnClients ( qtrue, TEAM_BLUE );
|
||||
G_RespawnClients ( qtrue, TEAM_RED, fullRestart );
|
||||
G_RespawnClients ( qtrue, TEAM_BLUE, fullRestart );
|
||||
|
||||
level.gametypeStartTime = level.time;
|
||||
level.gametypeResetTime = 0;
|
||||
|
||||
if ( fullRestart )
|
||||
{
|
||||
level.warmupTime = 0;
|
||||
level.startTime = level.time;
|
||||
memset ( level.teamScores, 0, sizeof(level.teamScores) );
|
||||
trap_SetConfigstring( CS_WARMUP, va("%i", level.warmupTime) );
|
||||
trap_SetConfigstring( CS_LEVEL_START_TIME, va("%i", level.startTime ) );
|
||||
}
|
||||
|
||||
// Reset the clients local effects
|
||||
tent = G_TempEntity( vec3_origin, EV_GAMETYPE_RESTART );
|
||||
tent->r.svFlags |= SVF_BROADCAST;
|
||||
|
@ -543,6 +622,71 @@ qboolean G_ParseGametypeFile ( void )
|
|||
return qtrue;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
G_EnableGametypeItemPickup
|
||||
|
||||
Drops all of the gametype items held by the player
|
||||
=================
|
||||
*/
|
||||
void G_EnableGametypeItemPickup ( gentity_t* ent )
|
||||
{
|
||||
ent->s.eFlags &= ~EF_NOPICKUP;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
G_DropGametypeItems
|
||||
|
||||
Drops all of the gametype items held by the player
|
||||
=================
|
||||
*/
|
||||
void G_DropGametypeItems ( gentity_t* self, int delayPickup )
|
||||
{
|
||||
float angle;
|
||||
int i;
|
||||
gentity_t *drop;
|
||||
gitem_t *item;
|
||||
|
||||
// drop all custom gametype items
|
||||
angle = 0;
|
||||
for ( i = 0 ; i < MAX_GAMETYPE_ITEMS ; i++ )
|
||||
{
|
||||
// skip this gametype item if the client doenst have it
|
||||
if ( !(self->client->ps.stats[STAT_GAMETYPE_ITEMS] & (1<<i)) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
item = BG_FindGametypeItem ( i );
|
||||
if ( !item )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
drop = G_DropItem( self, item, angle );
|
||||
drop->count = 1;
|
||||
angle += 45;
|
||||
|
||||
if ( delayPickup )
|
||||
{
|
||||
drop->nextthink = level.time + delayPickup;
|
||||
drop->s.eFlags |= EF_NOPICKUP;
|
||||
drop->think = G_EnableGametypeItemPickup;
|
||||
}
|
||||
|
||||
// TAke it away from the client just in case
|
||||
self->client->ps.stats[STAT_GAMETYPE_ITEMS] &= ~(1<<i);
|
||||
|
||||
if ( self->enemy && self->enemy->client && !OnSameTeam ( self->enemy, self ) )
|
||||
{
|
||||
trap_GT_SendEvent ( GTEV_ITEM_DEFEND, level.time, level.gametypeItems[item->giTag].id, self->enemy->s.clientNum, self->enemy->client->sess.team, 0, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
self->client->ps.stats[STAT_GAMETYPE_ITEMS] = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
CheckGametype
|
||||
|
@ -560,10 +704,9 @@ void CheckGametype ( void )
|
|||
// the first person joins
|
||||
if ( !level.gametypeStartTime )
|
||||
{
|
||||
int counts[TEAM_NUM_TEAMS];
|
||||
int i;
|
||||
|
||||
memset ( counts, 0, sizeof(counts) );
|
||||
memset ( level.teamAliveCount, 0, sizeof(level.teamAliveCount) );
|
||||
|
||||
for ( i = 0; i < level.numConnectedClients; i ++ )
|
||||
{
|
||||
|
@ -579,12 +722,12 @@ void CheckGametype ( void )
|
|||
continue;
|
||||
}
|
||||
|
||||
counts[other->client->sess.team]++;
|
||||
level.teamAliveCount[other->client->sess.team]++;
|
||||
}
|
||||
|
||||
if ( counts[TEAM_RED] || counts[TEAM_BLUE] )
|
||||
if ( level.teamAliveCount[TEAM_RED] || level.teamAliveCount[TEAM_BLUE] || level.teamAliveCount[TEAM_FREE] )
|
||||
{
|
||||
G_ResetGametype ( );
|
||||
G_ResetGametype ( qfalse );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -597,7 +740,7 @@ void CheckGametype ( void )
|
|||
// Dont do this again
|
||||
level.gametypeResetTime = 0;
|
||||
|
||||
G_ResetGametype ( );
|
||||
G_ResetGametype ( qfalse );
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -612,7 +755,7 @@ void CheckGametype ( void )
|
|||
if ( level.gametypeRespawnTime[team] && level.time > level.gametypeRespawnTime[team] )
|
||||
{
|
||||
// Respawn all dead clients
|
||||
G_RespawnClients ( qfalse, team );
|
||||
G_RespawnClients ( qfalse, team, qfalse );
|
||||
|
||||
// Next interval
|
||||
level.gametypeRespawnTime[team] = 0;
|
||||
|
@ -621,13 +764,12 @@ void CheckGametype ( void )
|
|||
}
|
||||
|
||||
// If we are in RT_NONE respawn mode then we need to look for everyone being dead
|
||||
if ( level.time > level.gametypeDelayTime && level.gametypeData->respawnType == RT_NONE && level.gametypeStartTime )
|
||||
if ( level.gametypeData->respawnType == RT_NONE && level.gametypeStartTime )
|
||||
{
|
||||
int i;
|
||||
int alive[TEAM_NUM_TEAMS];
|
||||
int dead[TEAM_NUM_TEAMS];
|
||||
|
||||
memset ( &alive[0], 0, sizeof(alive) );
|
||||
memset ( &level.teamAliveCount[0], 0, sizeof(level.teamAliveCount) );
|
||||
memset ( &dead[0], 0, sizeof(dead) );
|
||||
for ( i = 0; i < level.numConnectedClients; i ++ )
|
||||
{
|
||||
|
@ -644,17 +786,19 @@ void CheckGametype ( void )
|
|||
}
|
||||
else
|
||||
{
|
||||
alive[ent->client->sess.team] ++;
|
||||
level.teamAliveCount[ent->client->sess.team] ++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( level.time > level.gametypeDelayTime )
|
||||
{
|
||||
// If everyone is dead on a team then reset the gametype, but only if
|
||||
// there was someone on that team to begin with.
|
||||
if ( !alive[TEAM_RED] && dead[TEAM_RED] )
|
||||
if ( !level.teamAliveCount[TEAM_RED] && dead[TEAM_RED] )
|
||||
{
|
||||
trap_GT_SendEvent ( GTEV_TEAM_ELIMINATED, level.time, TEAM_RED, 0, 0, 0, 0 );
|
||||
}
|
||||
else if ( !alive[TEAM_BLUE] && dead[TEAM_BLUE] )
|
||||
else if ( !level.teamAliveCount[TEAM_BLUE] && dead[TEAM_BLUE] )
|
||||
{
|
||||
trap_GT_SendEvent ( GTEV_TEAM_ELIMINATED, level.time, TEAM_BLUE, 0, 0, 0, 0 );
|
||||
}
|
||||
|
@ -666,6 +810,7 @@ void CheckGametype ( void )
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -681,7 +826,7 @@ int G_GametypeCommand ( int cmd, int arg0, int arg1, int arg2, int arg3, int arg
|
|||
case GTCMD_RESTART:
|
||||
if ( arg0 <= 0 )
|
||||
{
|
||||
G_ResetGametype ( );
|
||||
G_ResetGametype ( qfalse );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -697,7 +842,7 @@ int G_GametypeCommand ( int cmd, int arg0, int arg1, int arg2, int arg3, int arg
|
|||
G_Voice ( &g_entities[arg0], NULL, SAY_TEAM, (const char*) arg1, qfalse );
|
||||
break;
|
||||
|
||||
case GTCMD_REGISTERGLOBALSOUND:
|
||||
case GTCMD_REGISTERSOUND:
|
||||
return G_SoundIndex ( (char*) arg0 );
|
||||
|
||||
case GTCMD_STARTGLOBALSOUND:
|
||||
|
@ -709,9 +854,20 @@ int G_GametypeCommand ( int cmd, int arg0, int arg1, int arg2, int arg3, int arg
|
|||
break;
|
||||
}
|
||||
|
||||
case GTCMD_STARTSOUND:
|
||||
G_SoundAtLoc ( (float*)arg1, CHAN_AUTO, arg0 );
|
||||
break;
|
||||
|
||||
case GTCMD_REGISTEREFFECT:
|
||||
return G_EffectIndex ( (char*) arg0 );
|
||||
|
||||
case GTCMD_REGISTERICON:
|
||||
return G_IconIndex ( (char*) arg0 );
|
||||
|
||||
case GTCMD_SETHUDICON:
|
||||
G_SetHUDIcon ( arg0, arg1 );
|
||||
break;
|
||||
|
||||
case GTCMD_PLAYEFFECT:
|
||||
G_PlayEffect ( arg0, (float*) arg1, (float*) arg2 );
|
||||
break;
|
||||
|
@ -741,6 +897,95 @@ int G_GametypeCommand ( int cmd, int arg0, int arg1, int arg2, int arg3, int arg
|
|||
Com_sprintf ( (char*) arg1, arg2, "%s", g_entities[arg0].client->pers.netname );
|
||||
break;
|
||||
|
||||
case GTCMD_GETTRIGGERTARGET:
|
||||
{
|
||||
gentity_t *find;
|
||||
|
||||
Com_sprintf ( (char*) arg1, arg2, "" );
|
||||
|
||||
find = NULL;
|
||||
while ( NULL != (find = G_Find ( find, FOFS(classname), "gametype_trigger" ) ) )
|
||||
{
|
||||
if ( find->health == arg0 )
|
||||
{
|
||||
Com_sprintf ( (char*) arg1, arg2, "%s", find->target );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case GTCMD_GETCLIENTORIGIN:
|
||||
VectorCopy ( g_entities[arg0].client->ps.origin, (float*) arg1 );
|
||||
break;
|
||||
|
||||
case GTCMD_GIVECLIENTITEM:
|
||||
{
|
||||
gitem_t* item;
|
||||
|
||||
item = BG_FindGametypeItemByID ( arg1 );
|
||||
if ( item )
|
||||
{
|
||||
level.clients[arg0].ps.stats[STAT_GAMETYPE_ITEMS] |= (1<<item->giTag);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case GTCMD_GETCLIENTLIST:
|
||||
{
|
||||
int i;
|
||||
int count;
|
||||
int *clients = (int*)arg1;
|
||||
|
||||
for ( i = 0, count = 0; i < level.numConnectedClients && count < arg2; i ++ )
|
||||
{
|
||||
gclient_t* client = &level.clients[level.sortedClients[i]];
|
||||
|
||||
if ( client->pers.connected != CON_CONNECTED )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( client->sess.team == arg0 )
|
||||
{
|
||||
*clients = level.sortedClients[i];
|
||||
clients++;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
case GTCMD_TAKECLIENTITEM:
|
||||
{
|
||||
gitem_t* item;
|
||||
|
||||
item = BG_FindGametypeItemByID ( arg1 );
|
||||
if ( item )
|
||||
{
|
||||
level.clients[arg0].ps.stats[STAT_GAMETYPE_ITEMS] &= ~(1<<item->giTag);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case GTCMD_SPAWNITEM:
|
||||
{
|
||||
gitem_t* item;
|
||||
|
||||
item = BG_FindGametypeItemByID ( arg0 );
|
||||
if ( item )
|
||||
{
|
||||
gentity_t* ent = LaunchItem ( item, (float*)arg1, vec3_origin );
|
||||
if ( ent )
|
||||
{
|
||||
VectorCopy ( (float*)arg2, ent->s.angles );
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case GTCMD_DOESCLIENTHAVEITEM:
|
||||
{
|
||||
gitem_t* item;
|
||||
|
@ -763,11 +1008,28 @@ int G_GametypeCommand ( int cmd, int arg0, int arg1, int arg2, int arg3, int arg
|
|||
case GTCMD_REGISTERITEM:
|
||||
{
|
||||
gitem_t *item;
|
||||
gtItemDef_t *def;
|
||||
|
||||
def = (gtItemDef_t*)arg2;
|
||||
|
||||
item = BG_FindItem ( (const char*) arg1 );
|
||||
if ( item )
|
||||
{
|
||||
gtitem_t *gtitem;
|
||||
|
||||
gtitem = &level.gametypeItems[item->giTag];
|
||||
|
||||
gtitem->id = arg0;
|
||||
item->quantity = arg0;
|
||||
|
||||
// See if the trigger needs to be used.
|
||||
if ( def && def->size == sizeof(gtItemDef_t) && def->use )
|
||||
{
|
||||
gtitem->useIcon = def->useIcon;
|
||||
gtitem->useTime = def->useTime;
|
||||
gtitem->useSound = def->useSound;
|
||||
}
|
||||
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
|
@ -777,6 +1039,9 @@ int G_GametypeCommand ( int cmd, int arg0, int arg1, int arg2, int arg3, int arg
|
|||
case GTCMD_REGISTERTRIGGER:
|
||||
{
|
||||
gentity_t *find;
|
||||
gtTriggerDef_t *def;
|
||||
|
||||
def = (gtTriggerDef_t*)arg2;
|
||||
|
||||
find = NULL;
|
||||
while ( NULL != (find = G_Find ( find, FOFS(classname), "gametype_trigger" ) ) )
|
||||
|
@ -789,12 +1054,26 @@ int G_GametypeCommand ( int cmd, int arg0, int arg1, int arg2, int arg3, int arg
|
|||
// Assign the id to it.
|
||||
find->health = arg0;
|
||||
find->touch = gametype_trigger_touch;
|
||||
|
||||
// See if the trigger needs to be used.
|
||||
if ( def && def->size == sizeof(gtTriggerDef_t) && def->use )
|
||||
{
|
||||
find->use = gametype_trigger_use;
|
||||
find->delay = def->useIcon;
|
||||
find->soundPos1 = def->useTime;
|
||||
find->soundLoop = def->useSound;
|
||||
}
|
||||
|
||||
trap_LinkEntity (find);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
case GTCMD_USETARGETS:
|
||||
G_UseTargetsByName ( (const char*) arg0, NULL, NULL );
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -298,6 +298,7 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace)
|
|||
int respawn;
|
||||
qboolean predict;
|
||||
qboolean autoswitch;
|
||||
int eventID;
|
||||
|
||||
if (!other->client)
|
||||
return;
|
||||
|
@ -316,7 +317,7 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace)
|
|||
if ( ent->item->giType == IT_GAMETYPE )
|
||||
{
|
||||
// Let the gametype decide if it can be picked up
|
||||
if ( !trap_GT_SendEvent ( GTEV_ITEM_TOUCHED, level.time, ent->item->quantity, other->s.number, other->client->sess.team, 0, 0 ) )
|
||||
if ( !trap_GT_SendEvent ( GTEV_ITEM_TOUCHED, level.time, level.gametypeItems[ent->item->giTag].id, other->s.number, other->client->sess.team, 0, 0 ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -362,19 +363,25 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace)
|
|||
return;
|
||||
}
|
||||
|
||||
if ( !respawn )
|
||||
if ( !respawn && !(ent->flags & FL_DROPPED_ITEM) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
eventID = EV_ITEM_PICKUP;
|
||||
if ( other->client && (other->client->ps.pm_flags & PMF_DUCKED ) )
|
||||
{
|
||||
eventID = EV_ITEM_PICKUP_QUIET;
|
||||
}
|
||||
|
||||
// play the normal pickup sound
|
||||
if (predict)
|
||||
{
|
||||
G_AddPredictableEvent( other, EV_ITEM_PICKUP, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) );
|
||||
G_AddPredictableEvent( other, eventID, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) );
|
||||
}
|
||||
else
|
||||
{
|
||||
G_AddEvent( other, EV_ITEM_PICKUP, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) );
|
||||
G_AddEvent( other, eventID, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) );
|
||||
}
|
||||
|
||||
// fire item targets
|
||||
|
@ -454,7 +461,7 @@ gentity_t *LaunchItem( gitem_t *item, vec3_t origin, vec3_t velocity )
|
|||
// Gametype items must be spawned using the spawn mission item function
|
||||
if ( item->giType == IT_GAMETYPE )
|
||||
{
|
||||
dropped = G_SpawnGametypeItem ( item->pickup_name, qtrue );
|
||||
dropped = G_SpawnGametypeItem ( item->pickup_name, qtrue, origin );
|
||||
dropped->nextthink = 0;
|
||||
}
|
||||
else
|
||||
|
@ -513,14 +520,14 @@ gentity_t *G_DropItem( gentity_t *ent, gitem_t *item, float angle )
|
|||
angles[PITCH] = 0; // always forward
|
||||
|
||||
AngleVectors( angles, velocity, NULL, NULL );
|
||||
VectorScale( velocity, 150, velocity );
|
||||
velocity[2] += 200 + crandom() * 50;
|
||||
VectorScale( velocity, 100, velocity );
|
||||
velocity[2] += 100 + crandom() * 50;
|
||||
|
||||
dropped = LaunchItem( item, ent->r.currentOrigin, velocity );
|
||||
|
||||
if ( item->giType == IT_GAMETYPE )
|
||||
{
|
||||
trap_GT_SendEvent ( GTEV_ITEM_DROPPED, level.time, item->quantity, ent->s.number, 0, 0, 0 );
|
||||
trap_GT_SendEvent ( GTEV_ITEM_DROPPED, level.time, level.gametypeItems[item->giTag].id, ent->s.number, 0, 0, 0 );
|
||||
}
|
||||
|
||||
return dropped;
|
||||
|
@ -610,6 +617,12 @@ gentity_t* G_DropWeapon ( gentity_t* ent, weapon_t weapon, int pickupDelay )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// Make sure they have the weapon
|
||||
if ( !(ent->client->ps.stats[STAT_WEAPONS] & (1<<weapon) ) )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// No more outfitting changes
|
||||
ent->client->noOutfittingChange = qtrue;
|
||||
|
||||
|
@ -734,7 +747,7 @@ void FinishSpawningItem( gentity_t *ent )
|
|||
ent->s.radius = 60;
|
||||
}
|
||||
*/
|
||||
if ( ent->item->giType != IT_GAMETYPE && ent->spawnflags & 1 )
|
||||
if ( ent->item->giType != IT_GAMETYPE && (ent->spawnflags & 1) )
|
||||
{
|
||||
// suspended
|
||||
G_SetOrigin( ent, ent->s.origin );
|
||||
|
@ -765,6 +778,12 @@ void FinishSpawningItem( gentity_t *ent )
|
|||
return;
|
||||
}
|
||||
|
||||
// Gametype items are broadcast
|
||||
if ( ent->item->giType == IT_GAMETYPE )
|
||||
{
|
||||
ent->r.svFlags |= SVF_BROADCAST;
|
||||
}
|
||||
|
||||
trap_LinkEntity (ent);
|
||||
}
|
||||
|
||||
|
@ -841,11 +860,28 @@ void SaveRegisteredItems( void )
|
|||
G_ItemDisabled
|
||||
============
|
||||
*/
|
||||
int G_ItemDisabled( gitem_t *item )
|
||||
qboolean G_ItemDisabled( gitem_t *item )
|
||||
{
|
||||
char name[128];
|
||||
int val;
|
||||
Com_sprintf(name, sizeof(name), "disable_%s", item->classname);
|
||||
return trap_Cvar_VariableIntegerValue( name );
|
||||
|
||||
val = trap_Cvar_VariableIntegerValue( name );
|
||||
|
||||
if ( !val )
|
||||
{
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
if ( val == 2 )
|
||||
{
|
||||
if ( !level.gametypeData->pickupsDisabled )
|
||||
{
|
||||
return qfalse;
|
||||
}
|
||||
}
|
||||
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -882,7 +918,7 @@ void G_SpawnItem (gentity_t *ent, gitem_t *item)
|
|||
ent->nextthink = level.time + FRAMETIME * 2;
|
||||
ent->think = FinishSpawningItem;
|
||||
|
||||
ent->physicsBounce = 0.50; // items are bouncy
|
||||
ent->physicsBounce = 0.2f; // items are bouncy
|
||||
}
|
||||
|
||||
|
||||
|
@ -992,7 +1028,7 @@ void G_RunItem( gentity_t *ent )
|
|||
{
|
||||
// Let the gametype handle the problem, if it doenst handle it and return 1 then
|
||||
// just reset the gametype item
|
||||
if ( !trap_GT_SendEvent ( GTEV_ITEM_STUCK, level.time, ent->item->quantity, 0, 0, 0, 0 ) )
|
||||
if ( !trap_GT_SendEvent ( GTEV_ITEM_STUCK, level.time, level.gametypeItems[ent->item->giTag].id, 0, 0, 0, 0 ) )
|
||||
{
|
||||
G_ResetGametypeItem ( ent->item );
|
||||
}
|
||||
|
|
|
@ -166,6 +166,15 @@ typedef struct gspawn_s
|
|||
|
||||
} gspawn_t;
|
||||
|
||||
typedef struct gtitem_s
|
||||
{
|
||||
int id;
|
||||
int useIcon;
|
||||
int useSound;
|
||||
int useTime;
|
||||
|
||||
} gtitem_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CON_DISCONNECTED,
|
||||
|
@ -179,6 +188,7 @@ typedef enum
|
|||
SPECTATOR_NOT,
|
||||
SPECTATOR_FREE,
|
||||
SPECTATOR_FOLLOW,
|
||||
SPECTATOR_FOLLOWFIRST,
|
||||
SPECTATOR_SCOREBOARD
|
||||
|
||||
} spectatorState_t;
|
||||
|
@ -224,6 +234,7 @@ typedef struct
|
|||
team_t team; // current team
|
||||
int spectatorTime; // for determining next-in-line to play
|
||||
spectatorState_t spectatorState;
|
||||
qboolean spectatorFirstPerson; // First person following?
|
||||
int spectatorClient; // for chasecam and follow mode
|
||||
int score; // total score
|
||||
int kills; // number of kills
|
||||
|
@ -232,6 +243,8 @@ typedef struct
|
|||
int teamkillDamage; // amount of damage death to teammates
|
||||
int teamkillForgiveTime; // time when team damage will be forgivin
|
||||
qboolean noTeamChange; // cant change teams when this is true (rt_none only)
|
||||
int chatIgnoreClients[2]; // Clients which are ignoring this client. [0] = (0-31) [1] = (32-63)
|
||||
qboolean muted;
|
||||
|
||||
} clientSession_t;
|
||||
|
||||
|
@ -369,6 +382,10 @@ struct gclient_s
|
|||
vec3_t ghoulHeadAngles;
|
||||
|
||||
gentity_t *siameseTwin;
|
||||
gentity_t *useEntity;
|
||||
|
||||
vec3_t maxSave;
|
||||
vec3_t minSave;
|
||||
};
|
||||
|
||||
|
||||
|
@ -378,6 +395,8 @@ struct gclient_s
|
|||
#define MAX_SPAWN_VARS 64
|
||||
#define MAX_SPAWN_VARS_CHARS 4096
|
||||
|
||||
#define MAX_AUTOKICKLIST 32
|
||||
|
||||
typedef struct
|
||||
{
|
||||
struct gclient_s *clients; // [maxclients]
|
||||
|
@ -409,6 +428,7 @@ typedef struct
|
|||
int globalVoiceTime; // last global voice
|
||||
|
||||
int teamScores[TEAM_NUM_TEAMS];
|
||||
int teamAliveCount[TEAM_NUM_TEAMS];
|
||||
int lastTeamLocationTime; // last time of client team location update
|
||||
|
||||
qboolean newSession; // don't use any old session data, because
|
||||
|
@ -483,6 +503,7 @@ typedef struct
|
|||
int gametypeRespawnTime[TEAM_NUM_TEAMS];
|
||||
int gametypeDelayTime;
|
||||
const char* gametypeTeam[TEAM_NUM_TEAMS];
|
||||
gtitem_t gametypeItems[MAX_GAMETYPE_ITEMS];
|
||||
|
||||
void* serverGhoul2;
|
||||
animation_t ghoulAnimations[MAX_ANIMATIONS];
|
||||
|
@ -496,6 +517,11 @@ typedef struct
|
|||
|
||||
int timeExtension;
|
||||
|
||||
int autokickedCount;
|
||||
int autokickedHead;
|
||||
char autokickedName[MAX_AUTOKICKLIST][MAX_NETNAME];
|
||||
char autokickedIP[MAX_AUTOKICKLIST][20];
|
||||
|
||||
} level_locals_t;
|
||||
|
||||
//
|
||||
|
@ -542,7 +568,7 @@ void RespawnItem( gentity_t *ent );
|
|||
|
||||
void PrecacheItem ( gitem_t *it );
|
||||
gentity_t* G_DropItem ( gentity_t *ent, gitem_t *item, float angle );
|
||||
gentity_t* G_LaunchItem ( gitem_t *item, vec3_t origin, vec3_t velocity );
|
||||
gentity_t* LaunchItem ( gitem_t *item, vec3_t origin, vec3_t velocity );
|
||||
gentity_t* G_DropWeapon ( gentity_t* ent, weapon_t weapon, int pickupDelay );
|
||||
|
||||
void SetRespawn (gentity_t *ent, float delay);
|
||||
|
@ -581,10 +607,12 @@ void G_InitGentity( gentity_t *e );
|
|||
gentity_t *G_Spawn (void);
|
||||
gentity_t *G_TempEntity( vec3_t origin, int event );
|
||||
void G_PlayEffect(int fxID, vec3_t org, vec3_t ang);
|
||||
void G_SetHUDIcon ( int index, int icon );
|
||||
void G_Sound( gentity_t *ent, int channel, int soundIndex );
|
||||
void G_SoundAtLoc( vec3_t loc, int channel, int soundIndex );
|
||||
void G_EntitySound( gentity_t *ent, int channel, int soundIndex );
|
||||
void G_FreeEntity( gentity_t *e );
|
||||
void G_FreeEnitityChildren( gentity_t* ent );
|
||||
qboolean G_EntitiesFree( void );
|
||||
|
||||
void G_TouchTriggers (gentity_t *ent);
|
||||
|
@ -619,6 +647,7 @@ qboolean trap_G2API_GetAnimFileNameIndex ( void* ghoul2, qhandle_t modelIndex, c
|
|||
void trap_G2_ListModelSurfaces(void *ghlInfo);
|
||||
void trap_G2_ListModelBones(void *ghlInfo, int frame);
|
||||
int trap_G2API_AddBolt(void *ghoul2, const int modelIndex, const char *boneName);
|
||||
void trap_G2API_SetBoltInfo(void *ghoul2, int modelIndex, int boltInfo);
|
||||
qboolean trap_G2API_RemoveBolt(void *ghlInfo, const int modelIndex, const int index);
|
||||
qboolean trap_G2API_AttachG2Model(void *ghoul2From, int modelFrom, void *ghoul2To, int toBoltIndex, int toModel);
|
||||
void trap_G2_SetGhoul2ModelIndexes(void *ghoul2, qhandle_t *modelList, qhandle_t *skinList);
|
||||
|
@ -647,7 +676,7 @@ qboolean trap_G2API_SetBoneAnim(void *ghoul2, const int modelIndex, const char *
|
|||
qboolean CanDamage ( gentity_t *targ, vec3_t origin);
|
||||
int G_GetHitLocation ( gentity_t *target, vec3_t ppoint, vec3_t dir );
|
||||
int G_Damage ( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, vec3_t dir, vec3_t point, int damage, int dflags, int mod, int location );
|
||||
qboolean G_RadiusDamage ( vec3_t origin, gentity_t *attacker, float damage, float radius, gentity_t *ignore, int power, int mod);
|
||||
qboolean G_RadiusDamage ( vec3_t origin, gentity_t *attacker, float damage, float radius, gentity_t *ignore, int power, int dflags, int mod );
|
||||
void body_die ( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int meansOfDeath, int hitLocation, vec3_t hitDir );
|
||||
void TossClientItems ( gentity_t *self );
|
||||
|
||||
|
@ -661,6 +690,7 @@ void TossClientItems ( gentity_t *self );
|
|||
#define DAMAGE_AREA_DAMAGE 0x00000400 // spawn area damage
|
||||
#define DAMAGE_NO_GORE 0x00000800 // dont spawn gore pieces with this damage
|
||||
#define DAMAGE_FORCE_GORE 0x00001000 // force something to pop off
|
||||
#define DAMAGE_NO_TEAMKILL 0x00002000 // does not produce teamkill damage
|
||||
|
||||
//
|
||||
// g_missile.c
|
||||
|
@ -723,13 +753,13 @@ void G_UpdateClientAnimations ( gentity_t* ent );
|
|||
void G_SetRespawnTimer ( gentity_t* ent );
|
||||
gentity_t* G_FindNearbyClient ( vec3_t origin, team_t team, float radius, gentity_t* ignore );
|
||||
void G_AddClientSpawn ( gentity_t* ent, team_t team );
|
||||
qboolean G_IsClientChatIgnored ( int ignorer, int ingnoree );
|
||||
void G_IgnoreClientChat ( int ignorer, int ignoree, qboolean ignore );
|
||||
|
||||
//
|
||||
// g_svcmds.c
|
||||
//
|
||||
qboolean ConsoleCommand ( void );
|
||||
void G_ProcessIPBans ( void );
|
||||
qboolean G_FilterPacket ( char *from );
|
||||
|
||||
//
|
||||
// g_weapon.c
|
||||
|
@ -805,19 +835,22 @@ void Svcmd_AddBot_f( void );
|
|||
void Svcmd_BotList_f( void );
|
||||
void BotInterbreedEndMatch( void );
|
||||
qboolean G_DoesMapSupportGametype ( const char* gametype );
|
||||
qboolean G_DoesMapExist ( const char* mapname );
|
||||
void G_LoadArenas ( void );
|
||||
|
||||
//
|
||||
// g_gametype.c
|
||||
//
|
||||
gentity_t* G_SelectGametypeSpawnPoint ( team_t team, vec3_t origin, vec3_t angles );
|
||||
gentity_t* G_SpawnGametypeItem ( const char* pickup_name, qboolean dropped );
|
||||
gentity_t* G_SpawnGametypeItem ( const char* pickup_name, qboolean dropped, vec3_t origin );
|
||||
gentity_t* G_SelectRandomGametypeSpawnPoint ( team_t team );
|
||||
qboolean G_ParseGametypeFile ( void );
|
||||
qboolean G_ExecuteGametypeScript ( gentity_t* activator, const char* name );
|
||||
void G_ResetGametype ( void );
|
||||
void G_ResetGametype ( qboolean fullRestart );
|
||||
qboolean G_CanGametypeTriggerBeUsed ( gentity_t* self, gentity_t* activator );
|
||||
void G_ResetGametypeItem ( gitem_t* item );
|
||||
void gametype_item_use ( gentity_t* self, gentity_t* other );
|
||||
void G_DropGametypeItems ( gentity_t* self, int delayPickup );
|
||||
|
||||
// ai_main.c
|
||||
#define MAX_FILEPATH 144
|
||||
|
@ -877,11 +910,10 @@ extern vmCvar_t g_warmup;
|
|||
extern vmCvar_t g_doWarmup;
|
||||
extern vmCvar_t g_allowVote;
|
||||
extern vmCvar_t g_voteDuration;
|
||||
extern vmCvar_t g_voteKickBanTime;
|
||||
extern vmCvar_t g_failedVoteDelay;
|
||||
extern vmCvar_t g_teamAutoJoin;
|
||||
extern vmCvar_t g_teamForceBalance;
|
||||
extern vmCvar_t g_banIPs;
|
||||
extern vmCvar_t g_filterBan;
|
||||
extern vmCvar_t g_smoothClients;
|
||||
extern vmCvar_t pmove_fixed;
|
||||
extern vmCvar_t pmove_msec;
|
||||
|
@ -892,6 +924,7 @@ extern vmCvar_t RMG;
|
|||
extern vmCvar_t g_debugRMG;
|
||||
extern vmCvar_t g_timeouttospec;
|
||||
extern vmCvar_t g_roundtimelimit;
|
||||
extern vmCvar_t g_roundjointime;
|
||||
extern vmCvar_t g_timeextension;
|
||||
extern vmCvar_t g_roundstartdelay;
|
||||
extern vmCvar_t g_availableWeapons;
|
||||
|
@ -903,8 +936,13 @@ extern vmCvar_t g_suicidePenalty;
|
|||
extern vmCvar_t g_teamkillPenalty;
|
||||
extern vmCvar_t g_teamkillDamageMax;
|
||||
extern vmCvar_t g_teamkillDamageForgive;
|
||||
extern vmCvar_t g_teamkillBanTime;
|
||||
extern vmCvar_t g_teamkillNoExcuseTime;
|
||||
extern vmCvar_t g_teamkillNoExcuseMultiplier;
|
||||
extern vmCvar_t g_voiceFloodCount;
|
||||
extern vmCvar_t g_voiceFloodPenalty;
|
||||
extern vmCvar_t g_voiceTalkingGhosts;
|
||||
extern vmCvar_t g_suddenDeath;
|
||||
|
||||
void trap_Printf( const char *fmt );
|
||||
void trap_Error( const char *fmt );
|
||||
|
|
|
@ -52,11 +52,10 @@ vmCvar_t g_logSync;
|
|||
vmCvar_t g_logHits;
|
||||
vmCvar_t g_allowVote;
|
||||
vmCvar_t g_voteDuration;
|
||||
vmCvar_t g_voteKickBanTime;
|
||||
vmCvar_t g_failedVoteDelay;
|
||||
vmCvar_t g_teamAutoJoin;
|
||||
vmCvar_t g_teamForceBalance;
|
||||
vmCvar_t g_banIPs;
|
||||
vmCvar_t g_filterBan;
|
||||
vmCvar_t g_smoothClients;
|
||||
vmCvar_t pmove_fixed;
|
||||
vmCvar_t pmove_msec;
|
||||
|
@ -66,6 +65,7 @@ vmCvar_t g_fps;
|
|||
vmCvar_t g_respawnInterval;
|
||||
vmCvar_t g_respawnInvulnerability;
|
||||
vmCvar_t g_roundtimelimit;
|
||||
vmCvar_t g_roundjointime;
|
||||
vmCvar_t g_timeextension;
|
||||
vmCvar_t g_timeouttospec;
|
||||
vmCvar_t g_roundstartdelay;
|
||||
|
@ -78,8 +78,13 @@ vmCvar_t g_suicidePenalty; // Amount of score added for killing yourself (typ
|
|||
vmCvar_t g_teamkillPenalty; // Amount of score added for killing a teammates (typically negative)
|
||||
vmCvar_t g_teamkillDamageMax; // max damage one can do to teammates before being kicked
|
||||
vmCvar_t g_teamkillDamageForgive; // amount of teamkill damage forgiven each minute
|
||||
vmCvar_t g_teamkillBanTime; // number of minutes to ban someone for after being kicked
|
||||
vmCvar_t g_teamkillNoExcuseTime; // number of seconds into a round where tk damage is inexcusable
|
||||
vmCvar_t g_teamkillNoExcuseMultiplier; // multipier for tk damage that is inexcusable
|
||||
vmCvar_t g_voiceFloodCount; // Number of voice messages in one minute to be concidered flooding
|
||||
vmCvar_t g_voiceFloodPenalty; // Amount of time a void flooder must wait before they can use voice again
|
||||
vmCvar_t g_suddenDeath;
|
||||
vmCvar_t g_voiceTalkingGhosts; // Allow ghosts to talk to alive players
|
||||
|
||||
vmCvar_t RMG;
|
||||
vmCvar_t g_debugRMG;
|
||||
|
@ -122,9 +127,6 @@ static cvarTable_t gameCvarTable[] =
|
|||
|
||||
{ &g_password, "g_password", "", CVAR_USERINFO, 0.0, 0.0, 0, qfalse },
|
||||
|
||||
{ &g_banIPs, "g_banIPs", "", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
|
||||
{ &g_filterBan, "g_filterBan", "1", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
|
||||
|
||||
{ &g_needpass, "g_needpass", "0", CVAR_SERVERINFO | CVAR_ROM, 0.0, 0.0, 0, qfalse },
|
||||
|
||||
{ &g_dedicated, "dedicated", "0", 0, 0.0, 0.0, 0, qfalse },
|
||||
|
@ -143,6 +145,7 @@ static cvarTable_t gameCvarTable[] =
|
|||
|
||||
{ &g_allowVote, "g_allowVote", "1", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
|
||||
{ &g_voteDuration, "g_voteDuration", "60", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
|
||||
{ &g_voteKickBanTime, "g_voteKickBanTime", "0", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
|
||||
{ &g_failedVoteDelay, "g_failedVoteDelay", "1", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
|
||||
{ &g_listEntity, "g_listEntity", "0", 0, 0.0, 0.0, 0, qfalse },
|
||||
|
||||
|
@ -160,11 +163,33 @@ static cvarTable_t gameCvarTable[] =
|
|||
|
||||
{ &g_timeouttospec, "g_timeouttospec", "15", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
|
||||
{ &g_roundtimelimit, "g_roundtimelimit", "5", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
|
||||
{ &g_roundjointime, "g_roundjointime", "5", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
|
||||
{ &g_timeextension, "g_timeextension", "15", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
|
||||
|
||||
{ &g_roundstartdelay, "g_roundstartdelay", "5", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
|
||||
|
||||
{ &g_availableWeapons, "g_availableWeapons", "2222222222211", CVAR_ARCHIVE|CVAR_SERVERINFO|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ &g_availableWeapons, "g_availableWeapons", "0", CVAR_SERVERINFO|CVAR_ROM|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
|
||||
{ NULL, "disable_weapon_knife", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_US_SOCOM", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_M19", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_silvertalon", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_microuzi", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_M3A1", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_MP5", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_USAS_12", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_M590", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_MSG90A1", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_M4", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_AK_74", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_SIG551", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_M60", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_RPG_7", "2", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_MM_1", "2", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_M84", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_SMOHG92", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_AN_M14", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
{ NULL, "disable_pickup_weapon_M15", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
|
||||
|
||||
{ &g_forceFollow, "g_forceFollow", "0", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
|
||||
{ &g_followEnemy, "g_followEnemy", "1", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
|
||||
|
@ -181,6 +206,13 @@ static cvarTable_t gameCvarTable[] =
|
|||
{ &g_teamkillPenalty, "g_teamkillPenalty", "-1", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
|
||||
{ &g_teamkillDamageMax, "g_teamkillDamageMax", "300", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
|
||||
{ &g_teamkillDamageForgive, "g_teamkillDamageForgive", "50", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
|
||||
{ &g_teamkillBanTime, "g_teamkillBanTime", "5", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
|
||||
{ &g_teamkillNoExcuseTime, "g_teamkillNoExcuseTime", "8", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
|
||||
{ &g_teamkillNoExcuseMultiplier, "g_teamkillNoExcuseMultiplier", "3", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
|
||||
|
||||
{ &g_suddenDeath, "g_suddenDeath", "1", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
|
||||
|
||||
{ &g_voiceTalkingGhosts, "g_voiceTalkingGhosts", "1", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
|
||||
};
|
||||
|
||||
// bk001129 - made static to avoid aliasing
|
||||
|
@ -410,6 +442,47 @@ void G_UpdateCvars( void )
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
G_UpdateAvailableWeapons
|
||||
|
||||
Updates the g_availableWeapons cvar using the disable cvars.
|
||||
===============
|
||||
*/
|
||||
void G_UpdateAvailableWeapons ( void )
|
||||
{
|
||||
weapon_t weapon;
|
||||
char available[WP_NUM_WEAPONS+1];
|
||||
|
||||
memset ( available, 0, sizeof(available) );
|
||||
|
||||
for ( weapon = WP_KNIFE; weapon < WP_NUM_WEAPONS; weapon ++ )
|
||||
{
|
||||
gitem_t* item = BG_FindWeaponItem ( weapon );
|
||||
if ( !item )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
switch ( (int)trap_Cvar_VariableValue ( va("disable_%s", item->classname ) ) )
|
||||
{
|
||||
case 0:
|
||||
available[weapon-1] = '2';
|
||||
break;
|
||||
|
||||
case 1:
|
||||
available[weapon-1] = '0';
|
||||
break;
|
||||
|
||||
case 2:
|
||||
available[weapon-1] = '1';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
trap_Cvar_Set ( "g_availableWeapons", available );
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
G_SetGametype
|
||||
|
@ -449,6 +522,7 @@ void G_SetGametype ( const char* gametype )
|
|||
|
||||
gametype = bg_gametypeData[i].name;
|
||||
trap_Cvar_Set( "g_gametype", gametype );
|
||||
trap_Cvar_Set( "RMG_mission", gametype );
|
||||
level.gametype = BG_FindGametype ( gametype );
|
||||
|
||||
trap_Cvar_Update( &g_gametype );
|
||||
|
@ -494,7 +568,6 @@ void G_InitGame( int levelTime, int randomSeed, int restart )
|
|||
|
||||
G_RegisterCvars();
|
||||
|
||||
G_ProcessIPBans();
|
||||
|
||||
// Load the list of arenas
|
||||
G_LoadArenas ( );
|
||||
|
@ -505,6 +578,12 @@ void G_InitGame( int levelTime, int randomSeed, int restart )
|
|||
// Set the current gametype
|
||||
G_SetGametype(g_gametype.string);
|
||||
|
||||
// Sets the available weapons cvar from the disable_ cvars.
|
||||
G_UpdateAvailableWeapons ( );
|
||||
|
||||
// Set the available outfitting
|
||||
BG_SetAvailableOutfitting ( g_availableWeapons.string );
|
||||
|
||||
// Give the game a uniqe id
|
||||
trap_SetConfigstring ( CS_GAME_ID, va("%d", randomSeed ) );
|
||||
|
||||
|
@ -573,8 +652,6 @@ void G_InitGame( int levelTime, int randomSeed, int restart )
|
|||
// reserve some spots for dead player bodies
|
||||
G_InitBodyQueue();
|
||||
|
||||
BG_ParseInviewFile();
|
||||
|
||||
ClearRegisteredItems();
|
||||
|
||||
// parse the key/value pairs and spawn gentities
|
||||
|
@ -585,6 +662,8 @@ void G_InitGame( int levelTime, int randomSeed, int restart )
|
|||
// linked up properly
|
||||
G_ParseGametypeFile ( );
|
||||
|
||||
BG_ParseInviewFile( level.pickupsDisabled );
|
||||
|
||||
// Load in the identities
|
||||
BG_ParseNPCFiles ( );
|
||||
|
||||
|
@ -612,9 +691,6 @@ void G_InitGame( int levelTime, int randomSeed, int restart )
|
|||
|
||||
G_RemapTeamShaders();
|
||||
|
||||
// Set the available outfitting
|
||||
BG_SetAvailableOutfitting ( g_availableWeapons.string );
|
||||
|
||||
// Initialize the gametype
|
||||
trap_GT_Init ( g_gametype.string, restart );
|
||||
|
||||
|
@ -943,8 +1019,12 @@ void MoveClientToIntermission( gentity_t *ent )
|
|||
G_StopFollowing( ent );
|
||||
}
|
||||
|
||||
FindIntermissionPoint ( );
|
||||
|
||||
// move to the spot
|
||||
VectorCopy( level.intermission_origin, ent->s.origin );
|
||||
VectorCopy( level.intermission_origin, ent->r.currentOrigin );
|
||||
VectorCopy( level.intermission_origin, ent->client->ps.pvsOrigin );
|
||||
VectorCopy( level.intermission_origin, ent->client->ps.origin );
|
||||
VectorCopy (level.intermission_angle, ent->client->ps.viewangles);
|
||||
|
||||
|
@ -1122,7 +1202,7 @@ void QDECL G_LogPrintf( const char *fmt, ... ) {
|
|||
tens = sec / 10;
|
||||
sec -= tens * 10;
|
||||
|
||||
Com_sprintf( string, sizeof(string), "%fi:%i%i ", min, tens, sec );
|
||||
Com_sprintf( string, sizeof(string), "%4i:%i%i ", min, tens, sec );
|
||||
|
||||
va_start( argptr, fmt );
|
||||
vsprintf( string +8 , fmt,argptr );
|
||||
|
@ -1342,7 +1422,7 @@ void CheckExitRules( void )
|
|||
}
|
||||
|
||||
// check for sudden death
|
||||
if ( ScoreIsTied() )
|
||||
if ( g_suddenDeath.integer && ScoreIsTied() )
|
||||
{
|
||||
// always wait for sudden death
|
||||
return;
|
||||
|
@ -1350,6 +1430,8 @@ void CheckExitRules( void )
|
|||
|
||||
// Check to see if the timelimit was hit
|
||||
if ( g_timelimit.integer && !level.warmupTime )
|
||||
{
|
||||
if ( level.gametypeData->respawnType != RT_NONE || level.gametypeResetTime )
|
||||
{
|
||||
if ( level.time - level.startTime >= (g_timelimit.integer + level.timeExtension)*60000 )
|
||||
{
|
||||
|
@ -1362,6 +1444,7 @@ void CheckExitRules( void )
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check to see if the score was hit
|
||||
if ( g_scorelimit.integer )
|
||||
|
@ -1498,10 +1581,12 @@ void CheckWarmup ( void )
|
|||
// if the warmup time has counted down, restart
|
||||
if ( level.time > level.warmupTime )
|
||||
{
|
||||
level.warmupTime += 10000;
|
||||
trap_Cvar_Set( "g_restarted", "1" );
|
||||
trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" );
|
||||
level.restarted = qtrue;
|
||||
// level.warmupTime += 10000;
|
||||
// trap_Cvar_Set( "g_restarted", "1" );
|
||||
|
||||
G_ResetGametype ( qtrue );
|
||||
// trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" );
|
||||
// level.restarted = qtrue;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,16 +119,16 @@ void G_ExplodeMissile( gentity_t *ent ) {
|
|||
if (ent->dflags & DAMAGE_AREA_DAMAGE)
|
||||
{
|
||||
// do damage over time rather than instantly
|
||||
G_CreateDamageArea ( ent->r.currentOrigin, ent->parent, ent->splashDamage*0.05f,ent->splashRadius, 8000,ent->methodOfDeath );
|
||||
G_CreateDamageArea ( ent->r.currentOrigin, ent->parent, ent->splashDamage*0.06f,ent->splashRadius, 8000,ent->methodOfDeath );
|
||||
|
||||
// do some instant damage
|
||||
G_RadiusDamage( ent->r.currentOrigin, ent->parent, ent->damage, ent->splashRadius, ent,
|
||||
1, ent->splashMethodOfDeath );
|
||||
1, ent->dflags, ent->splashMethodOfDeath );
|
||||
}
|
||||
else
|
||||
{ // normal radius of effect damage
|
||||
G_RadiusDamage( ent->r.currentOrigin, ent->parent, ent->splashDamage, ent->splashRadius, ent,
|
||||
1, ent->splashMethodOfDeath );
|
||||
1, ent->dflags, ent->splashMethodOfDeath );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ G_CauseAreaDamage
|
|||
*/
|
||||
void G_CauseAreaDamage( gentity_t *ent )
|
||||
{
|
||||
G_RadiusDamage ( ent->r.currentOrigin, ent->parent, ent->splashDamage, ent->splashRadius, ent, 3, ent->methodOfDeath );
|
||||
G_RadiusDamage ( ent->r.currentOrigin, ent->parent, ent->splashDamage, ent->splashRadius, ent, 3, DAMAGE_NO_TEAMKILL, ent->methodOfDeath );
|
||||
|
||||
ent->s.time2--;
|
||||
|
||||
|
@ -443,16 +443,16 @@ void G_MissileImpact( gentity_t *ent, trace_t *trace )
|
|||
if (ent->dflags & DAMAGE_AREA_DAMAGE)
|
||||
{
|
||||
// do damage over time rather than instantly
|
||||
G_CreateDamageArea ( trace->endpos, ent->parent, ent->splashDamage*0.10f,ent->splashRadius*2, 8000,ent->methodOfDeath );
|
||||
G_CreateDamageArea ( trace->endpos, ent->parent, ent->splashDamage*0.06f,ent->splashRadius*2, 8000,ent->methodOfDeath );
|
||||
|
||||
// do some instant damage
|
||||
G_RadiusDamage( trace->endpos, ent->parent, ent->damage, ent->splashRadius, other,
|
||||
1, ent->splashMethodOfDeath );
|
||||
1, ent->dflags, ent->splashMethodOfDeath );
|
||||
}
|
||||
else
|
||||
{ // normal radius of effect damage
|
||||
G_RadiusDamage( trace->endpos, ent->parent, ent->splashDamage, ent->splashRadius,
|
||||
other, 1, ent->splashMethodOfDeath );
|
||||
other, 1, ent->dflags, ent->splashMethodOfDeath );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -554,23 +554,15 @@ void G_RunMissile( gentity_t *ent )
|
|||
if ( tr.fraction != 1 )
|
||||
{
|
||||
// Hit the sky or moving through something
|
||||
if ( tr.surfaceFlags & SURF_NOIMPACT )
|
||||
if ( (tr.surfaceFlags & SURF_NOIMPACT) && (tr.surfaceFlags & SURF_SKY) )
|
||||
{
|
||||
// Dont kill a missle that hits the sky and has gravity
|
||||
if ( tr.surfaceFlags & SURF_SKY )
|
||||
{
|
||||
ent->s.eFlags |= EF_INSKY;
|
||||
ent->r.svFlags |= SVF_BROADCAST;
|
||||
VectorCopy ( origin, ent->r.currentOrigin );
|
||||
trap_LinkEntity( ent );
|
||||
}
|
||||
else
|
||||
{
|
||||
G_FreeEntity( ent );
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
G_MissileImpact( ent, &tr );
|
||||
|
||||
|
|
|
@ -326,12 +326,13 @@ qboolean G_MoverPush( gentity_t *pusher, vec3_t move, vec3_t amove, gentity_t **
|
|||
}
|
||||
|
||||
// If being blocked by an item just let it pass through it and get rid of the item
|
||||
if ( check->s.eType == ET_ITEM )
|
||||
if ( check->s.eType == ET_ITEM && check->item->giType != IT_GAMETYPE )
|
||||
{
|
||||
G_FreeEntity ( check );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// the move was blocked an entity
|
||||
|
||||
// bobbing entities are instant-kill and never get blocked
|
||||
|
@ -1407,6 +1408,47 @@ void SP_func_static( gentity_t *ent ) {
|
|||
}
|
||||
}
|
||||
|
||||
void G_WallUse(gentity_t *self, gentity_t *other, gentity_t *activator)
|
||||
{
|
||||
if ( self->r.linked )
|
||||
{
|
||||
trap_UnlinkEntity ( self );
|
||||
}
|
||||
else
|
||||
{
|
||||
trap_LinkEntity ( self );
|
||||
}
|
||||
}
|
||||
|
||||
/*QUAKED func_wall (0 .5 .8) ? START_OFF
|
||||
A func wall can be turned off and on by targetting it.
|
||||
*/
|
||||
void SP_func_wall ( gentity_t* ent )
|
||||
{
|
||||
// Right now func walls are not supported in multiplayer
|
||||
if ( RMG.integer )
|
||||
{
|
||||
trap_UnlinkEntity ( ent );
|
||||
return;
|
||||
}
|
||||
|
||||
trap_SetBrushModel( ent, ent->model );
|
||||
|
||||
InitMover( ent );
|
||||
|
||||
VectorCopy( ent->s.origin, ent->s.pos.trBase );
|
||||
VectorCopy( ent->s.pos.trBase, ent->r.currentOrigin );
|
||||
VectorCopy( ent->s.apos.trBase, ent->r.currentAngles );
|
||||
|
||||
ent->s.eType = ET_WALL;
|
||||
|
||||
ent->use = G_WallUse;
|
||||
|
||||
if ( !(ent->spawnflags & 1 ) )
|
||||
{
|
||||
trap_LinkEntity( ent );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
|
|
@ -24,7 +24,10 @@
|
|||
|
||||
#define SVF_GLASS_BRUSH 0x08000000 // Ent is a glass brush
|
||||
|
||||
#define SVF_DOUBLED_BBOX 0x00001000 // Bounding box has been doubled
|
||||
#define SVF_INFLATED_BBOX 0x00001000 // Bounding box has been doubled
|
||||
#define SVF_LINKHACK 0x10000000 // Hack to link an entity into extra clusters
|
||||
#define SVF_DETAIL 0x20000000 // Entity is a detail entity and can be dropped from the snapshot
|
||||
#define SVF_SKIP 0x80000000 // Dont include this entity in the current snapshot (internal use only)
|
||||
|
||||
//===============================================================
|
||||
|
||||
|
@ -63,6 +66,8 @@ typedef struct {
|
|||
// by the second array index.
|
||||
int broadcastClients[2];
|
||||
|
||||
int detailTime;
|
||||
|
||||
} entityShared_t;
|
||||
|
||||
|
||||
|
|
|
@ -72,7 +72,6 @@ void G_InitSessionData( gclient_t *client, char *userinfo )
|
|||
if ( g_teamAutoJoin.integer )
|
||||
{
|
||||
sess->team = PickTeam( -1 );
|
||||
BroadcastTeamChange( client, -1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -131,6 +131,7 @@ void SP_func_door (gentity_t *ent);
|
|||
void SP_func_train (gentity_t *ent);
|
||||
void SP_func_timer (gentity_t *ent);
|
||||
void SP_func_glass (gentity_t *ent);
|
||||
void SP_func_wall (gentity_t *ent);
|
||||
|
||||
void SP_trigger_always (gentity_t *ent);
|
||||
void SP_trigger_multiple (gentity_t *ent);
|
||||
|
@ -192,6 +193,7 @@ spawn_t spawns[] =
|
|||
{"func_train", SP_func_train},
|
||||
{"func_timer", SP_func_timer},
|
||||
{"func_glass", SP_func_glass},
|
||||
{"func_wall", SP_func_wall},
|
||||
|
||||
// Triggers are brush objects that cause an effect when contacted
|
||||
// by a living player, usually involving firing targets.
|
||||
|
@ -252,7 +254,6 @@ spawn_t spawns[] =
|
|||
{"info_null", 0},
|
||||
{"door_rotating", 0},
|
||||
{"emplaced_wpn", 0},
|
||||
{"func_wall", 0},
|
||||
{"info_NPC*", 0},
|
||||
{"info_player_start", 0},
|
||||
{"NPC_*", 0},
|
||||
|
@ -260,6 +261,7 @@ spawn_t spawns[] =
|
|||
{"pickup_ammo", 0},
|
||||
{"script_runner", 0},
|
||||
{"trigger_arioche_objective", 0},
|
||||
{"func_brushmodel_child", 0},
|
||||
|
||||
{0, 0}
|
||||
};
|
||||
|
@ -432,6 +434,35 @@ void G_ParseField( const char *key, const char *value, gentity_t *ent ) {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
G_IsGametypeInList
|
||||
|
||||
Determines if the given gametype is in the given list.
|
||||
===================
|
||||
*/
|
||||
qboolean G_IsGametypeInList ( const char* gametype, const char* list )
|
||||
{
|
||||
const char* buf = (char*) list;
|
||||
char* token;
|
||||
|
||||
while ( 1 )
|
||||
{
|
||||
token = COM_Parse ( &buf );
|
||||
if ( !token || !token[0] )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if ( Q_stricmp ( token, gametype ) == 0 )
|
||||
{
|
||||
return qtrue;
|
||||
}
|
||||
}
|
||||
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
G_SpawnGEntityFromSpawnVars
|
||||
|
@ -486,15 +517,25 @@ void G_SpawnGEntityFromSpawnVars( qboolean inSubBSP )
|
|||
}
|
||||
|
||||
// Only spawn this entity in the specified gametype
|
||||
if( G_SpawnString( "gametype", NULL, &value ) )
|
||||
if( G_SpawnString( "gametype", NULL, &value ) && value )
|
||||
{
|
||||
// Has to be a case match
|
||||
if ( value && !strstr ( value, level.gametypeData->name ) )
|
||||
if ( !G_IsGametypeInList ( level.gametypeData->name, value ) )
|
||||
{
|
||||
if ( level.gametypeData->basegametype )
|
||||
{
|
||||
if ( !G_IsGametypeInList ( level.gametypeData->basegametype, value ) )
|
||||
{
|
||||
G_FreeEntity ( ent );
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
G_FreeEntity ( ent );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// move editor origin to pos
|
||||
VectorCopy( ent->s.origin, ent->s.pos.trBase );
|
||||
|
@ -977,7 +1018,7 @@ void SP_worldspawn( void )
|
|||
|
||||
trap_SetConfigstring( CS_MOTD, g_motd.string ); // message of the day
|
||||
|
||||
G_SpawnString( "gravity", "800", &text );
|
||||
G_SpawnString( "gravity", va("%d", g_gravity.integer), &text );
|
||||
trap_Cvar_Set( "g_gravity", text );
|
||||
|
||||
// Handle all the worldspawn stuff common to both main bsp and sub bsp
|
||||
|
|
|
@ -5,274 +5,8 @@
|
|||
|
||||
#include "g_local.h"
|
||||
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
PACKET FILTERING
|
||||
|
||||
|
||||
You can add or remove addresses from the filter list with:
|
||||
|
||||
addip <ip>
|
||||
removeip <ip>
|
||||
|
||||
The ip address is specified in dot format, and any unspecified digits will match any value, so you can specify an entire class C network with "addip 192.246.40".
|
||||
|
||||
Removeip will only remove an address specified exactly the same way. You cannot addip a subnet, then removeip a single host.
|
||||
|
||||
listip
|
||||
Prints the current list of filters.
|
||||
|
||||
g_filterban <0 or 1>
|
||||
|
||||
If 1 (the default), then ip addresses matching the current list will be prohibited from entering the game. This is the default setting.
|
||||
|
||||
If 0, then only addresses matching the list will be allowed. This lets you easily set up a private game, or a game that only allows players from your local network.
|
||||
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
// extern vmCvar_t g_banIPs;
|
||||
// extern vmCvar_t g_filterBan;
|
||||
|
||||
|
||||
typedef struct ipFilter_s
|
||||
{
|
||||
unsigned mask;
|
||||
unsigned compare;
|
||||
} ipFilter_t;
|
||||
|
||||
#define MAX_IPFILTERS 1024
|
||||
|
||||
static ipFilter_t ipFilters[MAX_IPFILTERS];
|
||||
static int numIPFilters;
|
||||
|
||||
char *ConcatArgs( int start );
|
||||
|
||||
/*
|
||||
=================
|
||||
StringToFilter
|
||||
=================
|
||||
*/
|
||||
static qboolean StringToFilter (char *s, ipFilter_t *f)
|
||||
{
|
||||
char num[128];
|
||||
int i, j;
|
||||
byte b[4];
|
||||
byte m[4];
|
||||
|
||||
for (i=0 ; i<4 ; i++)
|
||||
{
|
||||
b[i] = 0;
|
||||
m[i] = 0;
|
||||
}
|
||||
|
||||
for (i=0 ; i<4 ; i++)
|
||||
{
|
||||
if (*s < '0' || *s > '9')
|
||||
{
|
||||
Com_Printf( "Bad filter address: %s\n", s );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
j = 0;
|
||||
while (*s >= '0' && *s <= '9')
|
||||
{
|
||||
num[j++] = *s++;
|
||||
}
|
||||
num[j] = 0;
|
||||
b[i] = atoi(num);
|
||||
if (b[i] != 0)
|
||||
m[i] = 255;
|
||||
|
||||
if (!*s)
|
||||
break;
|
||||
s++;
|
||||
}
|
||||
|
||||
f->mask = *(unsigned *)m;
|
||||
f->compare = *(unsigned *)b;
|
||||
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
UpdateIPBans
|
||||
=================
|
||||
*/
|
||||
static void UpdateIPBans (void)
|
||||
{
|
||||
byte b[4];
|
||||
int i;
|
||||
char iplist[MAX_INFO_STRING];
|
||||
|
||||
*iplist = 0;
|
||||
for (i = 0 ; i < numIPFilters ; i++)
|
||||
{
|
||||
if (ipFilters[i].compare == 0xffffffff)
|
||||
continue;
|
||||
|
||||
*(unsigned *)b = ipFilters[i].compare;
|
||||
Com_sprintf( iplist + strlen(iplist), sizeof(iplist) - strlen(iplist),
|
||||
"%i.%i.%i.%i ", b[0], b[1], b[2], b[3]);
|
||||
}
|
||||
|
||||
trap_Cvar_Set( "g_banIPs", iplist );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
G_FilterPacket
|
||||
=================
|
||||
*/
|
||||
qboolean G_FilterPacket (char *from)
|
||||
{
|
||||
int i;
|
||||
unsigned in;
|
||||
byte m[4];
|
||||
char *p;
|
||||
|
||||
m[0] = m[1] = m[2] = m[3] = 0;
|
||||
|
||||
i = 0;
|
||||
p = from;
|
||||
while (*p && i < 4) {
|
||||
while (*p >= '0' && *p <= '9') {
|
||||
m[i] = m[i]*10 + (*p - '0');
|
||||
p++;
|
||||
}
|
||||
if (!*p || *p == ':')
|
||||
break;
|
||||
i++, p++;
|
||||
}
|
||||
|
||||
in = *(unsigned *)m;
|
||||
|
||||
for (i=0 ; i<numIPFilters ; i++)
|
||||
if ( (in & ipFilters[i].mask) == ipFilters[i].compare)
|
||||
return g_filterBan.integer != 0;
|
||||
|
||||
return g_filterBan.integer == 0;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
AddIP
|
||||
=================
|
||||
*/
|
||||
static void AddIP( char *str )
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0 ; i < numIPFilters ; i++)
|
||||
{
|
||||
if (ipFilters[i].compare == 0xffffffff)
|
||||
{
|
||||
break; // free spot
|
||||
}
|
||||
}
|
||||
|
||||
if (i == numIPFilters)
|
||||
{
|
||||
if (numIPFilters == MAX_IPFILTERS)
|
||||
{
|
||||
Com_Printf ("IP filter list is full\n");
|
||||
return;
|
||||
}
|
||||
numIPFilters++;
|
||||
}
|
||||
|
||||
if (!StringToFilter (str, &ipFilters[i]))
|
||||
{
|
||||
ipFilters[i].compare = 0xffffffffu;
|
||||
}
|
||||
|
||||
UpdateIPBans();
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
G_ProcessIPBans
|
||||
=================
|
||||
*/
|
||||
void G_ProcessIPBans(void)
|
||||
{
|
||||
char *s, *t;
|
||||
char str[MAX_TOKEN_CHARS];
|
||||
|
||||
Q_strncpyz( str, g_banIPs.string, sizeof(str) );
|
||||
|
||||
for (t = s = g_banIPs.string; *t; /* */ ) {
|
||||
s = strchr(s, ' ');
|
||||
if (!s)
|
||||
break;
|
||||
while (*s == ' ')
|
||||
*s++ = 0;
|
||||
if (*t)
|
||||
AddIP( t );
|
||||
t = s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
=================
|
||||
Svcmd_AddIP_f
|
||||
=================
|
||||
*/
|
||||
void Svcmd_AddIP_f (void)
|
||||
{
|
||||
char str[MAX_TOKEN_CHARS];
|
||||
|
||||
if ( trap_Argc() < 2 ) {
|
||||
Com_Printf("Usage: addip <ip-mask>\n");
|
||||
return;
|
||||
}
|
||||
|
||||
trap_Argv( 1, str, sizeof( str ) );
|
||||
|
||||
AddIP( str );
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
Svcmd_RemoveIP_f
|
||||
=================
|
||||
*/
|
||||
void Svcmd_RemoveIP_f (void)
|
||||
{
|
||||
ipFilter_t f;
|
||||
int i;
|
||||
char str[MAX_TOKEN_CHARS];
|
||||
|
||||
if ( trap_Argc() < 2 ) {
|
||||
Com_Printf("Usage: sv removeip <ip-mask>\n");
|
||||
return;
|
||||
}
|
||||
|
||||
trap_Argv( 1, str, sizeof( str ) );
|
||||
|
||||
if (!StringToFilter (str, &f))
|
||||
return;
|
||||
|
||||
for (i=0 ; i<numIPFilters ; i++) {
|
||||
if (ipFilters[i].mask == f.mask &&
|
||||
ipFilters[i].compare == f.compare) {
|
||||
ipFilters[i].compare = 0xffffffffu;
|
||||
Com_Printf ("Removed.\n");
|
||||
|
||||
UpdateIPBans();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Com_Printf ( "Didn't find %s.\n", str );
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
Svcmd_EntityList_f
|
||||
|
@ -359,6 +93,54 @@ void Svcmd_ExtendTime_f (void)
|
|||
trap_SendServerCommand( -1, va("print \"timelimit extended by %d minutes\n\"", time) );
|
||||
}
|
||||
|
||||
void Svcmd_AutoKickList_f ( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
for ( i = 0; i < level.autokickedCount; i ++ )
|
||||
{
|
||||
Com_Printf ( "%16s - %s\n", level.autokickedIP[i], level.autokickedName[i] );
|
||||
}
|
||||
}
|
||||
|
||||
void Svcmd_Mute_f ( void )
|
||||
{
|
||||
char str[MAX_TOKEN_CHARS];
|
||||
int clientnum;
|
||||
|
||||
if ( trap_Argc() < 2 )
|
||||
{
|
||||
Com_Printf("Usage: mute <clientid>\n");
|
||||
return;
|
||||
}
|
||||
|
||||
trap_Argv( 1, str, sizeof( str ) );
|
||||
clientnum = atoi ( str );
|
||||
|
||||
if ( clientnum < 0 || clientnum > MAX_CLIENTS )
|
||||
{
|
||||
Com_Printf("invalid client id\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( level.clients[clientnum].pers.connected != CON_CONNECTED )
|
||||
{
|
||||
Com_Printf("no client connected with that client id\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
level.clients[clientnum].sess.muted = level.clients[clientnum].sess.muted ? qfalse : qtrue;
|
||||
|
||||
if ( level.clients[clientnum].sess.muted )
|
||||
{
|
||||
Com_Printf("client %d muted\n", clientnum );
|
||||
}
|
||||
else
|
||||
{
|
||||
Com_Printf("client %d unmuted\n", clientnum );
|
||||
}
|
||||
}
|
||||
|
||||
gclient_t *ClientForString( const char *s ) {
|
||||
gclient_t *cl;
|
||||
int i;
|
||||
|
@ -482,27 +264,10 @@ qboolean ConsoleCommand( void )
|
|||
|
||||
#endif
|
||||
|
||||
if (Q_stricmp (cmd, "addip") == 0)
|
||||
{
|
||||
Svcmd_AddIP_f();
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
if (Q_stricmp (cmd, "removeip") == 0)
|
||||
{
|
||||
Svcmd_RemoveIP_f();
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
if (Q_stricmp (cmd, "listip") == 0)
|
||||
{
|
||||
trap_SendConsoleCommand( EXEC_NOW, "g_banIPs\n" );
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
if (Q_stricmp (cmd, "gametype_restart" ) == 0 )
|
||||
{
|
||||
G_ResetGametype ( );
|
||||
trap_Argv( 1, cmd, sizeof( cmd ) );
|
||||
G_ResetGametype ( Q_stricmp ( cmd, "full" ) == 0 );
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
|
@ -512,6 +277,18 @@ qboolean ConsoleCommand( void )
|
|||
return qtrue;
|
||||
}
|
||||
|
||||
if ( Q_stricmp ( cmd, "autokicklist" ) == 0 )
|
||||
{
|
||||
Svcmd_AutoKickList_f();
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
if ( Q_stricmp ( cmd, "mute" ) == 0 )
|
||||
{
|
||||
Svcmd_Mute_f ( );
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
if (g_dedicated.integer)
|
||||
{
|
||||
if (Q_stricmp (cmd, "say") == 0)
|
||||
|
|
|
@ -194,6 +194,8 @@ equ trap_G2_ListModelSurfaces -586 ; G_G2_LISTSURFACES
|
|||
equ trap_G2_ListModelBones -585 ; G_G2_LISTBONES
|
||||
equ trap_G2_SetGhoul2ModelIndexes -588 ; G_G2_SETMODELS
|
||||
equ trap_G2_HaveWeGhoul2Models -587 ; G_G2_HAVEWEGHOULMODELS
|
||||
equ trap_G2API_AddBolt -591 ; G_G2_ADDBOLT
|
||||
equ trap_G2API_SetBoltInfo -592 ; G_G2_SETBOLTINFO
|
||||
equ trap_G2API_GetBoltMatrix -589 ; G_G2_GETBOLT
|
||||
equ trap_G2API_InitGhoul2Model -590 ; G_G2_INITGHOUL2MODEL
|
||||
equ trap_G2API_CleanGhoul2Models -600 ; G_G2_CLEANMODELS
|
||||
|
|
|
@ -825,6 +825,16 @@ qboolean trap_G2_HaveWeGhoul2Models( void *ghoul2)
|
|||
return (qboolean)(syscall(G_G2_HAVEWEGHOULMODELS, ghoul2));
|
||||
}
|
||||
|
||||
int trap_G2API_AddBolt(void *ghoul2, const int modelIndex, const char *boneName)
|
||||
{
|
||||
return (int) (syscall(G_G2_ADDBOLT, ghoul2, modelIndex, boneName));
|
||||
}
|
||||
|
||||
void trap_G2API_SetBoltInfo(void *ghoul2, int modelIndex, int boltInfo)
|
||||
{
|
||||
syscall(G_G2_SETBOLTINFO, ghoul2, modelIndex, boltInfo);
|
||||
}
|
||||
|
||||
qboolean trap_G2API_GetBoltMatrix(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix,
|
||||
const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale)
|
||||
{
|
||||
|
|
|
@ -151,7 +151,7 @@ Team_GetLocation
|
|||
Report a location for the player. Uses placed nearby target_location entities
|
||||
============
|
||||
*/
|
||||
gentity_t *Team_GetLocation(gentity_t *ent)
|
||||
gentity_t *Team_GetLocation(gentity_t *ent, qboolean pvs )
|
||||
{
|
||||
gentity_t *eloc, *best;
|
||||
float bestlen, len;
|
||||
|
@ -173,7 +173,7 @@ gentity_t *Team_GetLocation(gentity_t *ent)
|
|||
continue;
|
||||
}
|
||||
|
||||
if ( !trap_InPVS( origin, eloc->r.currentOrigin ) )
|
||||
if ( pvs && !trap_InPVS( origin, eloc->r.currentOrigin ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -195,7 +195,11 @@ qboolean Team_GetLocationMsg ( gentity_t *ent, char *loc, int loclen )
|
|||
{
|
||||
gentity_t *best;
|
||||
|
||||
best = Team_GetLocation( ent );
|
||||
best = Team_GetLocation( ent, qtrue );
|
||||
if ( !best )
|
||||
{
|
||||
best = Team_GetLocation( ent, qfalse );
|
||||
}
|
||||
|
||||
if (!best)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ const char* OtherTeamName ( team_t team );
|
|||
const char* TeamColorString ( team_t team );
|
||||
void G_AddTeamScore ( team_t team, int score );
|
||||
|
||||
gentity_t* Team_GetLocation ( gentity_t *ent );
|
||||
gentity_t* Team_GetLocation ( gentity_t *ent, qboolean pvs );
|
||||
qboolean Team_GetLocationMsg ( gentity_t *ent, char *loc, int loclen );
|
||||
|
||||
|
||||
|
|
|
@ -329,9 +329,14 @@ NO_PROTECTION *nothing* stops the damage
|
|||
|
||||
*/
|
||||
void hurt_use( gentity_t *self, gentity_t *other, gentity_t *activator ) {
|
||||
|
||||
if ( self->r.linked ) {
|
||||
trap_UnlinkEntity( self );
|
||||
} else {
|
||||
|
||||
// Triggers that are used to turn them on no longer cause suicide penalty
|
||||
self->methodOfDeath = MOD_TRIGGER_HURT_NOSUICIDE;
|
||||
|
||||
trap_LinkEntity( self );
|
||||
}
|
||||
}
|
||||
|
@ -364,7 +369,7 @@ void hurt_touch( gentity_t *self, gentity_t *other, trace_t *trace ) {
|
|||
dflags = DAMAGE_NO_PROTECTION;
|
||||
else
|
||||
dflags = 0;
|
||||
G_Damage (other, self, self, NULL, NULL, self->damage, dflags, MOD_TRIGGER_HURT, HL_NONE );
|
||||
G_Damage (other, self, self, NULL, NULL, self->damage, dflags, self->methodOfDeath, HL_NONE );
|
||||
}
|
||||
|
||||
void SP_trigger_hurt( gentity_t *self ) {
|
||||
|
@ -377,14 +382,13 @@ void SP_trigger_hurt( gentity_t *self ) {
|
|||
self->damage = 5;
|
||||
}
|
||||
|
||||
self->methodOfDeath = MOD_TRIGGER_HURT;
|
||||
self->r.contents = CONTENTS_TRIGGER;
|
||||
|
||||
if ( self->spawnflags & 2 ) {
|
||||
self->use = hurt_use;
|
||||
}
|
||||
|
||||
// link in to the world if starting active
|
||||
if ( ! (self->spawnflags & 1) ) {
|
||||
if ( ! (self->spawnflags & 1) )
|
||||
{
|
||||
trap_LinkEntity (self);
|
||||
}
|
||||
}
|
||||
|
@ -398,6 +402,7 @@ void SP_trigger_ladder ( gentity_t* self )
|
|||
{
|
||||
vec3_t fwd;
|
||||
|
||||
trap_SetBrushModel( self, self->model );
|
||||
trap_LinkEntity ( self );
|
||||
|
||||
trap_SetConfigstring( CS_LADDERS + level.ladderCount++,
|
||||
|
|
|
@ -252,7 +252,7 @@ void G_UseTargetsByName( const char* name, gentity_t* other, gentity_t *activato
|
|||
}
|
||||
}
|
||||
|
||||
if ( !other->inuse )
|
||||
if ( other && !other->inuse )
|
||||
{
|
||||
Com_Printf("entity was removed while using targets\n");
|
||||
return;
|
||||
|
@ -518,6 +518,33 @@ void G_FreeEntity( gentity_t *ed )
|
|||
ed->inuse = qfalse;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
G_FreeEnitityChildren
|
||||
|
||||
Frees any entity that is a child of the given entity
|
||||
=================
|
||||
*/
|
||||
void G_FreeEnitityChildren( gentity_t* ent )
|
||||
{
|
||||
gentity_t* from;
|
||||
|
||||
for ( from = g_entities; from < &g_entities[level.num_entities] ; from++)
|
||||
{
|
||||
if ( !from->inuse )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( from->parent != ent )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
G_FreeEntity ( from );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
G_TempEntity
|
||||
|
@ -662,6 +689,16 @@ void G_PlayEffect(int fxID, vec3_t org, vec3_t ang)
|
|||
te->s.eventParm = fxID;
|
||||
}
|
||||
|
||||
/*
|
||||
=============
|
||||
G_SetHUDIcon
|
||||
=============
|
||||
*/
|
||||
void G_SetHUDIcon ( int index, int icon )
|
||||
{
|
||||
trap_SetConfigstring ( CS_HUDICONS + index, va("%i", icon ) );
|
||||
}
|
||||
|
||||
/*
|
||||
=============
|
||||
G_Sound
|
||||
|
@ -685,6 +722,7 @@ void G_SoundAtLoc( vec3_t loc, int channel, int soundIndex ) {
|
|||
|
||||
te = G_TempEntity( loc, EV_GENERAL_SOUND );
|
||||
te->s.eventParm = soundIndex;
|
||||
te->r.svFlags |= SVF_BROADCAST;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -210,6 +210,8 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
|
|||
int i;
|
||||
vec3_t muzzlePoint;
|
||||
vec3_t fwd;
|
||||
vec3_t right;
|
||||
vec3_t up;
|
||||
vec3_t fireAngs;
|
||||
float damageMult;
|
||||
int hitcount;
|
||||
|
@ -239,14 +241,14 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
|
|||
inaccuracy = (float)ent->client->ps.inaccuracy / 1000.0f;
|
||||
if ( detailed )
|
||||
{
|
||||
if ( ent->client->ps.pm_flags & PMF_DUCKED )
|
||||
{
|
||||
inaccuracy *= DUCK_ACCURACY_MODIFIER;
|
||||
}
|
||||
else if ( ent->client->ps.pm_flags & PMF_JUMPING )
|
||||
if ( ent->client->ps.pm_flags & PMF_JUMPING )
|
||||
{
|
||||
inaccuracy *= JUMP_ACCURACY_MODIFIER;
|
||||
}
|
||||
else if ( ent->client->ps.pm_flags & PMF_DUCKED )
|
||||
{
|
||||
inaccuracy *= DUCK_ACCURACY_MODIFIER;
|
||||
}
|
||||
}
|
||||
|
||||
// Anti-lag
|
||||
|
@ -258,18 +260,14 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
|
|||
|
||||
// Handle leaning
|
||||
VectorCopy(ent->client->ps.viewangles, fireAngs);
|
||||
|
||||
AngleVectors( fireAngs, fwd, right, up);
|
||||
|
||||
if ( ent->client->ps.pm_flags & PMF_LEANING )
|
||||
{
|
||||
vec3_t right;
|
||||
float leanOffset;
|
||||
|
||||
leanOffset = (float)(ent->client->ps.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET;
|
||||
AngleVectors( fireAngs, NULL, right, NULL );
|
||||
VectorMA( muzzlePoint, leanOffset, right, muzzlePoint );
|
||||
BG_ApplyLeanOffset ( &ent->client->ps, muzzlePoint );
|
||||
}
|
||||
|
||||
AngleVectors( fireAngs, fwd, NULL, NULL );
|
||||
|
||||
// Move the start trace back a bit to account for bumping up against someone
|
||||
VectorMA ( muzzlePoint, -15, fwd, muzzlePoint );
|
||||
|
||||
|
@ -486,7 +484,7 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
|
|||
if ( level.time - traceEnt->client->invulnerableTime >= g_respawnInvulnerability.integer * 1000 )
|
||||
{
|
||||
// Shot my a teammate with ff off?
|
||||
if ( !level.gametypeData->teams || (ent->client && !(OnSameTeam(ent,traceEnt) && !g_friendlyFire.integer ) ) )
|
||||
if ( !level.gametypeData->teams || (ent->client && !(OnSameTeam(ent,traceEnt) && (!g_friendlyFire.integer || level.warmupTime) ) ) )
|
||||
{
|
||||
flesh = qtrue;
|
||||
}
|
||||
|
@ -526,6 +524,8 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
|
|||
tent->s.eventParm <<= MATERIAL_BITS;
|
||||
tent->s.eventParm |= (tr.surfaceFlags & MATERIAL_MASK);
|
||||
tent->s.time = weapon + ((attack&0xFF)<<8);
|
||||
tent->r.detailTime = level.time + rand() % 1000;
|
||||
tent->r.svFlags |= SVF_DETAIL;
|
||||
}
|
||||
|
||||
tent->s.otherEntityNum = ent->s.number;
|
||||
|
@ -549,12 +549,6 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
|
|||
|
||||
for ( h = 0; h < hitcount; h ++ )
|
||||
{
|
||||
// We wann all pellets counting towards team damage
|
||||
if ( ent->client )
|
||||
{
|
||||
ent->client->sess.teamkillForgiveTime = 0;
|
||||
}
|
||||
|
||||
G_Damage( hit[h].ent, ent, ent, fwd, hit[h].origin, hit[h].damage, flags, attackDat->mod + (attack<<8), hit[h].location );
|
||||
}
|
||||
}
|
||||
|
@ -588,7 +582,7 @@ gentity_t* G_FireProjectile ( gentity_t *ent, weapon_t weapon, attackType_t atta
|
|||
muzzlePoint[2] += ent->client->ps.viewheight;
|
||||
|
||||
// Inform of the grenade toss if its a timed grenade
|
||||
if ( weapon >= WP_M67_GRENADE && weapon < WP_M15_GRENADE && (flags&PROJECTILE_TIMED) && (ent->client->ps.pm_type == PM_NORMAL) )
|
||||
if ( weapon >= WP_M84_GRENADE && weapon < WP_M15_GRENADE && (flags&PROJECTILE_TIMED) && (ent->client->ps.pm_type == PM_NORMAL) )
|
||||
{
|
||||
gentity_t* nearby;
|
||||
|
||||
|
@ -607,12 +601,7 @@ gentity_t* G_FireProjectile ( gentity_t *ent, weapon_t weapon, attackType_t atta
|
|||
|
||||
if ( ent->client->ps.pm_flags & PMF_LEANING )
|
||||
{
|
||||
float leanOffset;
|
||||
|
||||
leanOffset = (float)(ent->client->ps.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET;
|
||||
fireAngs[ROLL] += leanOffset / 4;
|
||||
AngleVectors( fireAngs, NULL, right, NULL );
|
||||
VectorMA( muzzlePoint, leanOffset /* * 0.75f */, right, muzzlePoint );
|
||||
BG_ApplyLeanOffset ( &ent->client->ps, muzzlePoint );
|
||||
}
|
||||
|
||||
AngleVectors( fireAngs, fwd, right, up );
|
||||
|
|
|
@ -54,45 +54,44 @@ typedef enum
|
|||
MODELINDEX_WEAPON_KNIFE, // 6
|
||||
MODELINDEX_WEAPON_SOCOM,
|
||||
MODELINDEX_WEAPON_M19,
|
||||
MODELINDEX_WEAPON_SILVERTALON,
|
||||
MODELINDEX_WEAPON_MICROUZI,
|
||||
MODELINDEX_WEAPON_M3A1,
|
||||
|
||||
MODELINDEX_WEAPON_USAS12, // 11
|
||||
MODELINDEX_WEAPON_M3A1, // 11
|
||||
MODELINDEX_WEAPON_MP5,
|
||||
MODELINDEX_WEAPON_USAS12,
|
||||
MODELINDEX_WEAPON_M590,
|
||||
MODELINDEX_WEAPON_MSG90A1,
|
||||
MODELINDEX_WEAPON_M4,
|
||||
|
||||
MODELINDEX_WEAPON_M4, // 16
|
||||
MODELINDEX_WEAPON_AK74,
|
||||
|
||||
MODELINDEX_WEAPON_M60, // 16
|
||||
MODELINDEX_WEAPON_SIG551,
|
||||
MODELINDEX_WEAPON_M60,
|
||||
MODELINDEX_WEAPON_RPG7,
|
||||
MODELINDEX_WEAPON_MM1,
|
||||
MODELINDEX_WEAPON_M67,
|
||||
MODELINDEX_WEAPON_M84,
|
||||
|
||||
MODELINDEX_WEAPON_F1, // 21
|
||||
MODELINDEX_WEAPON_L2A2,
|
||||
MODELINDEX_WEAPON_MDN11,
|
||||
MODELINDEX_WEAPON_MM1, // 21
|
||||
MODELINDEX_WEAPON_M84,
|
||||
MODELINDEX_WEAPON_SMOHG92,
|
||||
MODELINDEX_WEAPON_ANM14,
|
||||
MODELINDEX_WEAPON_M15,
|
||||
|
||||
MODELINDEX_WEAPON_M15, // 26
|
||||
MODELINDEX_AMMO_045,
|
||||
MODELINDEX_AMMO_045, // 26
|
||||
MODELINDEX_AMMO_9MM,
|
||||
MODELINDEX_AMMO_12GAUGE,
|
||||
MODELINDEX_AMMO_762,
|
||||
MODELINDEX_AMMO_556,
|
||||
|
||||
MODELINDEX_AMMO_556, // 31
|
||||
MODELINDEX_AMMO_40MM,
|
||||
MODELINDEX_AMMO_40MM, // 31
|
||||
MODELINDEX_AMMO_RPG7,
|
||||
MODELINDEX_BACKPACK,
|
||||
|
||||
MODELINDEX_GAMETYPE_ITEM,
|
||||
MODELINDEX_GAMETYPE_ITEM, // 34
|
||||
MODELINDEX_GAMETYPE_ITEM_2,
|
||||
MODELINDEX_GAMETYPE_ITEM_3,
|
||||
MODELINDEX_GAMETYPE_ITEM_4,
|
||||
MODELINDEX_GAMETYPE_ITEM_5,
|
||||
|
||||
MODELINDEX_ARMOR,
|
||||
MODELINDEX_ARMOR, // 39
|
||||
MODELINDEX_NIGHTVISION,
|
||||
MODELINDEX_THERMAL,
|
||||
|
||||
|
|
|
@ -877,11 +877,17 @@ int Q_PrintStrlen( const char *string ) {
|
|||
|
||||
len = 0;
|
||||
p = string;
|
||||
while( *p ) {
|
||||
if( Q_IsColorString( p ) ) {
|
||||
p += 2;
|
||||
while( *p )
|
||||
{
|
||||
if( *p == '^' )
|
||||
{
|
||||
p++;
|
||||
if ( *p != '^' )
|
||||
{
|
||||
p ++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
p++;
|
||||
len++;
|
||||
}
|
||||
|
@ -898,10 +904,18 @@ char *Q_CleanStr( char *string ) {
|
|||
s = string;
|
||||
d = string;
|
||||
while ((c = *s) != 0 ) {
|
||||
if ( Q_IsColorString( s ) ) {
|
||||
|
||||
if( *s == '^' )
|
||||
{
|
||||
s++;
|
||||
if( *s == '^' )
|
||||
{
|
||||
*d++ = '^';
|
||||
*d++ = '^';
|
||||
}
|
||||
else if ( c >= 0x20 && c <= 0x7E ) {
|
||||
}
|
||||
else if ( c >= 0x20 && c <= 0x7E )
|
||||
{
|
||||
*d++ = c;
|
||||
}
|
||||
s++;
|
||||
|
|
|
@ -30,12 +30,25 @@
|
|||
//#define Q3_VERSION "SOF2MP V0.21" sent on 4/22/2002
|
||||
//#define Q3_VERSION "SOF2MP V1.00.22" sent on 4/26/2002
|
||||
//#define Q3_VERSION "SOF2MP V1.00.23" sent on 4/27/2002
|
||||
#if !defined(_SOF2DEV_) || defined(_DEBUG)
|
||||
#ifdef GERMAN_BUILD
|
||||
#define Q3_VERSION "SOF2MP V1.00g"
|
||||
#define SOF2_VERSION_ID "1.00g"
|
||||
// #define Q3_VERSION "SOF2MP V1.00g"
|
||||
#define Q3_VERSION "SOF2MP V1.02g" // sent on 6/10/2002
|
||||
// #define SOF2_VERSION_ID "1.00g"
|
||||
#define SOF2_VERSION_ID "1.02g" // sent on 6/10/2002
|
||||
#else
|
||||
#define Q3_VERSION "SOF2MP V1.00"
|
||||
#define SOF2_VERSION_ID "1.00"
|
||||
// #define Q3_VERSION "SOF2MP V1.00"
|
||||
#define Q3_VERSION "SOF2MP V1.02" // sent on 6/10/2002
|
||||
// #define SOF2_VERSION_ID "1.00"
|
||||
#define SOF2_VERSION_ID "1.02" // sent on 6/10/2002
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#define Q3_VERSION "SOF2MP V1.02 Developer" // sent on 6/10/2002
|
||||
// #define SOF2_VERSION_ID "1.00"
|
||||
#define SOF2_VERSION_ID "1.02D" // sent on 6/10/2002
|
||||
|
||||
#endif
|
||||
|
||||
//#define SPECIAL_PRE_CACHE 1
|
||||
|
@ -1340,6 +1353,7 @@ typedef enum {
|
|||
#define MAX_SUB_BSP 32
|
||||
#define MAX_ICONS 32
|
||||
#define MAX_CHARSKINS 64 // character skins
|
||||
#define MAX_HUDICONS 16 // icons on hud
|
||||
|
||||
#define MAX_CONFIGSTRINGS 1400
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -17,6 +17,7 @@ CFG=gt_ctf - Win32 Debug SoF2
|
|||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "gt_ctf - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "gt_ctf - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
|
@ -26,8 +27,38 @@ CPP=cl.exe
|
|||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "gt_ctf - Win32 Debug SoF2"
|
||||
!IF "$(CFG)" == "gt_ctf - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GT_CTF_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GT_CTF_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ELSEIF "$(CFG)" == "gt_ctf - Win32 Debug SoF2"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug SoF2"
|
||||
# PROP BASE Intermediate_Dir "Debug SoF2"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "..\..\Debug"
|
||||
|
@ -51,6 +82,7 @@ LINK32=link.exe
|
|||
|
||||
# Begin Target
|
||||
|
||||
# Name "gt_ctf - Win32 Debug"
|
||||
# Name "gt_ctf - Win32 Debug SoF2"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
|
|
|
@ -20,6 +20,13 @@ typedef struct gametypeLocals_s
|
|||
int redCaptureEffect;
|
||||
int blueCaptureEffect;
|
||||
|
||||
int iconRedFlag;
|
||||
int iconBlueFlag;
|
||||
int iconRedFlagDropped;
|
||||
int iconBlueFlagDropped;
|
||||
int iconRedFlagCarried;
|
||||
int iconBlueFlagCarried;
|
||||
|
||||
} gametypeLocals_t;
|
||||
|
||||
extern gametypeLocals_t gametype;
|
||||
|
|
|
@ -36,10 +36,9 @@ static cvarTable_t gametypeCvarTable[] =
|
|||
// don't override the cheat state set by the system
|
||||
{ >_flagReturnTime, "gt_flagReturnTime", "30", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
|
||||
{ >_simpleScoring, "gt_simpleScoring", "0", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
|
||||
{ NULL, NULL, NULL, 0, 0.0f, 0.0f, 0, qfalse },
|
||||
};
|
||||
|
||||
static int gametypeCvarTableSize = sizeof( gametypeCvarTable ) / sizeof( gametypeCvarTable[0] );
|
||||
|
||||
/*
|
||||
================
|
||||
vmMain
|
||||
|
@ -57,6 +56,8 @@ int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int a
|
|||
return 0;
|
||||
|
||||
case GAMETYPE_START:
|
||||
trap_Cmd_SetHUDIcon ( 0, gametype.iconRedFlag );
|
||||
trap_Cmd_SetHUDIcon ( 1, gametype.iconBlueFlag );
|
||||
return 0;
|
||||
|
||||
case GAMETYPE_RUN_FRAME:
|
||||
|
@ -77,10 +78,9 @@ GT_RegisterCvars
|
|||
*/
|
||||
void GT_RegisterCvars( void )
|
||||
{
|
||||
int i;
|
||||
cvarTable_t *cv;
|
||||
|
||||
for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ )
|
||||
for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ )
|
||||
{
|
||||
trap_Cvar_Register( cv->vmCvar, cv->cvarName, cv->defaultString, cv->cvarFlags, cv->mMinValue, cv->mMaxValue );
|
||||
|
||||
|
@ -98,10 +98,9 @@ GT_UpdateCvars
|
|||
*/
|
||||
void GT_UpdateCvars( void )
|
||||
{
|
||||
int i;
|
||||
cvarTable_t *cv;
|
||||
|
||||
for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ )
|
||||
for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ )
|
||||
{
|
||||
if ( cv->vmCvar )
|
||||
{
|
||||
|
@ -131,9 +130,18 @@ void GT_Init ( void )
|
|||
memset ( &gametype, 0, sizeof(gametype) );
|
||||
|
||||
// Register the global sounds
|
||||
gametype.flagReturnSound = trap_Cmd_RegisterGlobalSound ( "sound/ctf_return.mp3" );
|
||||
gametype.flagTakenSound = trap_Cmd_RegisterGlobalSound ( "sound/ctf_flag.mp3" );
|
||||
gametype.flagCaptureSound = trap_Cmd_RegisterGlobalSound ( "sound/ctf_win.mp3" );
|
||||
gametype.flagReturnSound = trap_Cmd_RegisterSound ( "sound/ctf_return.mp3" );
|
||||
gametype.flagTakenSound = trap_Cmd_RegisterSound ( "sound/ctf_flag.mp3" );
|
||||
gametype.flagCaptureSound = trap_Cmd_RegisterSound ( "sound/ctf_win.mp3" );
|
||||
|
||||
gametype.iconRedFlag = trap_Cmd_RegisterIcon ( "gfx/menus/hud/ctf_red" );
|
||||
gametype.iconBlueFlag = trap_Cmd_RegisterIcon ( "gfx/menus/hud/ctf_blue" );
|
||||
|
||||
gametype.iconRedFlagDropped = trap_Cmd_RegisterIcon ( "gfx/menus/hud/ctf_red_dropped" );
|
||||
gametype.iconBlueFlagDropped = trap_Cmd_RegisterIcon ( "gfx/menus/hud/ctf_blue_dropped" );
|
||||
|
||||
gametype.iconRedFlagCarried = trap_Cmd_RegisterIcon ( "gfx/menus/hud/ctf_red_carried" );
|
||||
gametype.iconBlueFlagCarried = trap_Cmd_RegisterIcon ( "gfx/menus/hud/ctf_blue_carried" );
|
||||
|
||||
// Register all cvars for this gametype
|
||||
GT_RegisterCvars ( );
|
||||
|
@ -165,6 +173,7 @@ void GT_RunFrame ( int time )
|
|||
{
|
||||
trap_Cmd_ResetItem ( ITEM_REDFLAG );
|
||||
trap_Cmd_TextMessage ( -1, "The Red Flag has returned!" );
|
||||
trap_Cmd_SetHUDIcon ( 0, gametype.iconRedFlag );
|
||||
trap_Cmd_StartGlobalSound ( gametype.flagReturnSound );
|
||||
gametype.redFlagDropTime = 0;
|
||||
}
|
||||
|
@ -174,6 +183,7 @@ void GT_RunFrame ( int time )
|
|||
{
|
||||
trap_Cmd_ResetItem ( ITEM_BLUEFLAG );
|
||||
trap_Cmd_TextMessage ( -1, "The Blue Flag has returned!" );
|
||||
trap_Cmd_SetHUDIcon ( 1, gametype.iconBlueFlag );
|
||||
trap_Cmd_StartGlobalSound ( gametype.flagReturnSound );
|
||||
gametype.blueFlagDropTime = 0;
|
||||
}
|
||||
|
@ -207,6 +217,7 @@ int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int ar
|
|||
trap_Cmd_TextMessage ( -1, "The Red Flag has returned!" );
|
||||
trap_Cmd_StartGlobalSound ( gametype.flagReturnSound );
|
||||
gametype.redFlagDropTime = 0;
|
||||
trap_Cmd_SetHUDIcon ( 0, gametype.iconRedFlag );
|
||||
return 1;
|
||||
|
||||
case ITEM_BLUEFLAG:
|
||||
|
@ -214,6 +225,7 @@ int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int ar
|
|||
trap_Cmd_TextMessage ( -1, "The Blue Flag has returned!" );
|
||||
trap_Cmd_StartGlobalSound ( gametype.flagReturnSound );
|
||||
gametype.blueFlagDropTime = 0;
|
||||
trap_Cmd_SetHUDIcon ( 1, gametype.iconBlueFlag );
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -229,11 +241,13 @@ int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int ar
|
|||
{
|
||||
case ITEM_BLUEFLAG:
|
||||
trap_Cmd_TextMessage ( -1, va("%s has dropped the Blue Flag!", clientname ) );
|
||||
trap_Cmd_SetHUDIcon ( 1, gametype.iconBlueFlagDropped );
|
||||
gametype.blueFlagDropTime = time;
|
||||
break;
|
||||
|
||||
case ITEM_REDFLAG:
|
||||
trap_Cmd_TextMessage ( -1, va("%s has dropped the Red Flag!", clientname ) );
|
||||
trap_Cmd_SetHUDIcon ( 0, gametype.iconRedFlagDropped );
|
||||
gametype.redFlagDropTime = time;
|
||||
break;
|
||||
}
|
||||
|
@ -252,6 +266,7 @@ int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int ar
|
|||
trap_Cmd_TextMessage ( -1, va("%s has taken the Blue Flag!", clientname ) );
|
||||
trap_Cmd_StartGlobalSound ( gametype.flagTakenSound );
|
||||
trap_Cmd_RadioMessage ( arg1, "got_it" );
|
||||
trap_Cmd_SetHUDIcon ( 1, gametype.iconBlueFlagCarried );
|
||||
gametype.blueFlagDropTime = 0;
|
||||
|
||||
return 1;
|
||||
|
@ -266,6 +281,7 @@ int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int ar
|
|||
trap_Cmd_TextMessage ( -1, va("%s has taken the Red Flag!", clientname ) );
|
||||
trap_Cmd_StartGlobalSound ( gametype.flagTakenSound );
|
||||
trap_Cmd_RadioMessage ( arg1, "got_it" );
|
||||
trap_Cmd_SetHUDIcon ( 0, gametype.iconRedFlagCarried );
|
||||
gametype.redFlagDropTime = 0;
|
||||
|
||||
return 1;
|
||||
|
@ -287,6 +303,7 @@ int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int ar
|
|||
trap_Cmd_ResetItem ( ITEM_REDFLAG );
|
||||
trap_Cmd_StartGlobalSound ( gametype.flagCaptureSound );
|
||||
trap_Cmd_AddTeamScore ( arg2, 1 );
|
||||
trap_Cmd_SetHUDIcon ( 0, gametype.iconRedFlag );
|
||||
|
||||
if ( !gt_simpleScoring.integer )
|
||||
{
|
||||
|
@ -306,6 +323,7 @@ int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int ar
|
|||
trap_Cmd_ResetItem ( ITEM_BLUEFLAG );
|
||||
trap_Cmd_StartGlobalSound ( gametype.flagCaptureSound );
|
||||
trap_Cmd_AddTeamScore ( arg2, 1 );
|
||||
trap_Cmd_SetHUDIcon ( 1, gametype.iconBlueFlag );
|
||||
|
||||
if ( !gt_simpleScoring.integer )
|
||||
{
|
||||
|
|
30
code/gametype/gt_dem/gt_dem.bat
Normal file
30
code/gametype/gt_dem/gt_dem.bat
Normal file
|
@ -0,0 +1,30 @@
|
|||
@set include=
|
||||
del /q vm
|
||||
mkdir vm
|
||||
cd vm
|
||||
set cc=..\..\..\..\bin\sof2lcc -A -DQ3_VM -DMISSIONPACK -S -Wf-target=bytecode -Wf-g -I..\..\..\gametype -I..\..\gt_dem -I..\..\..\game %1
|
||||
|
||||
%cc% ../gt_main.c
|
||||
@if errorlevel 1 goto quit
|
||||
|
||||
%cc% ../../gt_syscalls.c
|
||||
@if errorlevel 1 goto quit
|
||||
|
||||
%cc% ../../../game/bg_lib.c
|
||||
@if errorlevel 1 goto quit
|
||||
|
||||
%cc% ../../../game/q_shared.c
|
||||
@if errorlevel 1 goto quit
|
||||
|
||||
%cc% ../../../game/q_math.c
|
||||
@if errorlevel 1 goto quit
|
||||
|
||||
..\..\..\..\bin\sof2asm -f ../gt_dem
|
||||
@if errorlevel 1 goto quit
|
||||
|
||||
mkdir "..\..\..\..\base\vm"
|
||||
copy *.map "..\..\..\..\base\vm"
|
||||
copy *.qvm "..\..\..\..\base\vm"
|
||||
|
||||
:quit
|
||||
cd ..
|
132
code/gametype/gt_dem/gt_dem.dsp
Normal file
132
code/gametype/gt_dem/gt_dem.dsp
Normal file
|
@ -0,0 +1,132 @@
|
|||
# Microsoft Developer Studio Project File - Name="gt_dem" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=gt_dem - Win32 Debug SoF2
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "gt_dem.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "gt_dem.mak" CFG="gt_dem - Win32 Debug SoF2"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "gt_dem - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "gt_dem - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "gt_dem - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_dem_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_dem_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ELSEIF "$(CFG)" == "gt_dem - Win32 Debug SoF2"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug SoF2"
|
||||
# PROP BASE Intermediate_Dir "Debug SoF2"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "..\..\Debug"
|
||||
# PROP Intermediate_Dir "..\..\Debug\gt_dem"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_dem_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "_SOF2" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x40000000" /dll /map /debug /machine:I386 /out:"..\..\Debug/gt_demx86.dll"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "gt_dem - Win32 Debug"
|
||||
# Name "gt_dem - Win32 Debug SoF2"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\game\bg_lib.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gt_main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\gt_syscalls.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\game\q_math.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\game\q_shared.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gt_local.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\gt_public.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\sof2_gametype.def
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
7
code/gametype/gt_dem/gt_dem.q3asm
Normal file
7
code/gametype/gt_dem/gt_dem.q3asm
Normal file
|
@ -0,0 +1,7 @@
|
|||
-o "gt_dem"
|
||||
|
||||
gt_main
|
||||
bg_lib
|
||||
q_math
|
||||
q_shared
|
||||
..\..\gt_syscalls
|
37
code/gametype/gt_dem/gt_local.h
Normal file
37
code/gametype/gt_dem/gt_local.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
// Copyright (C) 2001-2002 Raven Software.
|
||||
//
|
||||
// gt_local.h -- local definitions for gametype module
|
||||
|
||||
#include "../../game/q_shared.h"
|
||||
#include "../gt_public.h"
|
||||
#include "../gt_syscalls.h"
|
||||
|
||||
typedef struct gametypeLocals_s
|
||||
{
|
||||
int time;
|
||||
|
||||
int bombBeepTime;
|
||||
|
||||
int bombPlantTime;
|
||||
vec3_t bombPlantOrigin;
|
||||
char bombPlantTarget[MAX_QPATH];
|
||||
|
||||
qboolean firstFrame;
|
||||
|
||||
int bombExplodeEffect;
|
||||
int bombBeepSound;
|
||||
int bombTakenSound;
|
||||
int bombExplodedSound;
|
||||
int bombPlantedSound;
|
||||
|
||||
int iconBombPlanted[7];
|
||||
|
||||
int bombGiveClient;
|
||||
int bombPlantClient;
|
||||
|
||||
qboolean roundOver;
|
||||
|
||||
} gametypeLocals_t;
|
||||
|
||||
extern gametypeLocals_t gametype;
|
||||
|
439
code/gametype/gt_dem/gt_main.c
Normal file
439
code/gametype/gt_dem/gt_main.c
Normal file
|
@ -0,0 +1,439 @@
|
|||
// Copyright (C) 2001-2002 Raven Software.
|
||||
//
|
||||
|
||||
#include "gt_local.h"
|
||||
|
||||
|
||||
#define TRIGGER_DEMOSITE_1 200
|
||||
#define TRIGGER_DEMOSITE_2 201
|
||||
|
||||
#define ITEM_BOMB 300
|
||||
#define ITEM_PLANTED_BOMB 301
|
||||
|
||||
void GT_Init ( void );
|
||||
void GT_RunFrame ( int time );
|
||||
int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int arg4 );
|
||||
|
||||
gametypeLocals_t gametype;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
vmCvar_t *vmCvar;
|
||||
char *cvarName;
|
||||
char *defaultString;
|
||||
int cvarFlags;
|
||||
float mMinValue, mMaxValue;
|
||||
int modificationCount; // for tracking changes
|
||||
qboolean trackChange; // track this variable, and announce if changed
|
||||
qboolean teamShader; // track and if changed, update shader state
|
||||
|
||||
} cvarTable_t;
|
||||
|
||||
vmCvar_t gt_bombFuseTime;
|
||||
vmCvar_t gt_bombDefuseTime;
|
||||
vmCvar_t gt_bombPlantTime;
|
||||
vmCvar_t gt_simpleScoring;
|
||||
|
||||
static cvarTable_t gametypeCvarTable[] =
|
||||
{
|
||||
// don't override the cheat state set by the system
|
||||
{ >_bombFuseTime, "gt_bombFuseTime", "30", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
|
||||
{ >_bombDefuseTime, "gt_bombDefuseTime", "3", CVAR_ARCHIVE|CVAR_LATCH, 0.0f, 0.0f, 0, qfalse },
|
||||
{ >_bombPlantTime, "gt_bombPlantTime", "3", CVAR_ARCHIVE|CVAR_LATCH, 0.0f, 0.0f, 0, qfalse },
|
||||
{ >_simpleScoring, "gt_simpleScoring", "0", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
|
||||
{ NULL, NULL, NULL, 0, 0.0f, 0.0f, 0, qfalse },
|
||||
};
|
||||
|
||||
static int gametypeCvarTableSize = sizeof( gametypeCvarTable ) / sizeof( gametypeCvarTable[0] );
|
||||
|
||||
/*
|
||||
================
|
||||
vmMain
|
||||
|
||||
This is the only way control passes into the module.
|
||||
This must be the very first function compiled into the .q3vm file
|
||||
================
|
||||
*/
|
||||
int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11 )
|
||||
{
|
||||
switch ( command )
|
||||
{
|
||||
case GAMETYPE_INIT:
|
||||
GT_Init ( );
|
||||
return 0;
|
||||
|
||||
case GAMETYPE_START:
|
||||
gametype.firstFrame = qtrue;
|
||||
gametype.bombPlantTime = 0;
|
||||
gametype.bombBeepTime = 0;
|
||||
gametype.roundOver = qfalse;
|
||||
trap_Cmd_SetHUDIcon ( 0, 0 );
|
||||
return 0;
|
||||
|
||||
case GAMETYPE_RUN_FRAME:
|
||||
GT_RunFrame ( arg0 );
|
||||
return 0;
|
||||
|
||||
case GAMETYPE_EVENT:
|
||||
return GT_Event ( arg0, arg1, arg2, arg3, arg4, arg5, arg6 );
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
GT_RegisterCvars
|
||||
=================
|
||||
*/
|
||||
void GT_RegisterCvars( void )
|
||||
{
|
||||
cvarTable_t *cv;
|
||||
|
||||
for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ )
|
||||
{
|
||||
trap_Cvar_Register( cv->vmCvar, cv->cvarName, cv->defaultString, cv->cvarFlags, cv->mMinValue, cv->mMaxValue );
|
||||
|
||||
if ( cv->vmCvar )
|
||||
{
|
||||
cv->modificationCount = cv->vmCvar->modificationCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
GT_UpdateCvars
|
||||
=================
|
||||
*/
|
||||
void GT_UpdateCvars( void )
|
||||
{
|
||||
cvarTable_t *cv;
|
||||
|
||||
for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ )
|
||||
{
|
||||
if ( cv->vmCvar )
|
||||
{
|
||||
trap_Cvar_Update( cv->vmCvar );
|
||||
|
||||
if ( cv->modificationCount != cv->vmCvar->modificationCount )
|
||||
{
|
||||
cv->modificationCount = cv->vmCvar->modificationCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
GT_Init
|
||||
|
||||
initializes the gametype by spawning the gametype items and
|
||||
preparing them
|
||||
================
|
||||
*/
|
||||
void GT_Init ( void )
|
||||
{
|
||||
gtTriggerDef_t triggerDef;
|
||||
gtItemDef_t itemDef;
|
||||
|
||||
memset ( &gametype, 0, sizeof(gametype) );
|
||||
|
||||
// Register all cvars for this gametype
|
||||
GT_RegisterCvars ( );
|
||||
|
||||
gametype.bombTakenSound = trap_Cmd_RegisterSound ( "sound/ctf_flag.mp3" );
|
||||
gametype.bombExplodedSound = trap_Cmd_RegisterSound ( "sound/ctf_win.mp3" );
|
||||
gametype.bombPlantedSound = trap_Cmd_RegisterSound ( "sound/ctf_base.mp3" );
|
||||
|
||||
gametype.bombExplodeEffect = trap_Cmd_RegisterEffect ( "explosions/mushroom_explosion.efx" );
|
||||
gametype.bombBeepSound = trap_Cmd_RegisterSound ( "sound/misc/c4/beep" );
|
||||
|
||||
// Register the triggers
|
||||
memset ( &triggerDef, 0, sizeof(triggerDef) );
|
||||
triggerDef.size = sizeof(triggerDef);
|
||||
triggerDef.use = qtrue;
|
||||
triggerDef.useTime = gt_bombPlantTime.integer * 1000;
|
||||
triggerDef.useIcon = trap_Cmd_RegisterIcon ( "gfx/menus/hud/tnt" );
|
||||
triggerDef.useSound = trap_Cmd_RegisterSound ( "sound/misc/c4/c4_loop" );
|
||||
trap_Cmd_RegisterTrigger ( TRIGGER_DEMOSITE_1, "demolition_site_1", &triggerDef );
|
||||
trap_Cmd_RegisterTrigger ( TRIGGER_DEMOSITE_2, "demolition_site_2", &triggerDef );
|
||||
|
||||
memset ( &itemDef, 0, sizeof(itemDef) );
|
||||
itemDef.size = sizeof(itemDef);
|
||||
trap_Cmd_RegisterItem ( ITEM_BOMB, "c4", &itemDef );
|
||||
|
||||
itemDef.use = qtrue;
|
||||
itemDef.useTime = gt_bombDefuseTime.integer * 1000;
|
||||
itemDef.useSound = triggerDef.useSound;
|
||||
itemDef.useIcon = trap_Cmd_RegisterIcon ( "gfx/menus/hud/wire_cutters" );
|
||||
trap_Cmd_RegisterItem ( ITEM_PLANTED_BOMB, "armed_c4", &itemDef );
|
||||
|
||||
gametype.iconBombPlanted[0] = trap_Cmd_RegisterIcon ( "gfx/menus/hud/dem_planted" );
|
||||
gametype.iconBombPlanted[1] = trap_Cmd_RegisterIcon ( "gfx/menus/hud/dem_planted1" );
|
||||
gametype.iconBombPlanted[2] = trap_Cmd_RegisterIcon ( "gfx/menus/hud/dem_planted2" );
|
||||
gametype.iconBombPlanted[3] = trap_Cmd_RegisterIcon ( "gfx/menus/hud/dem_planted3" );
|
||||
gametype.iconBombPlanted[4] = trap_Cmd_RegisterIcon ( "gfx/menus/hud/dem_planted4" );
|
||||
gametype.iconBombPlanted[5] = trap_Cmd_RegisterIcon ( "gfx/menus/hud/dem_planted5" );
|
||||
gametype.iconBombPlanted[6] = trap_Cmd_RegisterIcon ( "gfx/menus/hud/dem_planted6" );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
GT_RunFrame
|
||||
|
||||
Runs all thinking code for gametype
|
||||
================
|
||||
*/
|
||||
void GT_RunFrame ( int time )
|
||||
{
|
||||
gametype.time = time;
|
||||
|
||||
if ( gametype.firstFrame )
|
||||
{
|
||||
int clients[MAX_CLIENTS];
|
||||
int count;
|
||||
|
||||
count = trap_Cmd_GetClientList ( TEAM_BLUE, clients, 64 );
|
||||
|
||||
if ( count )
|
||||
{
|
||||
gametype.bombGiveClient = gametype.bombGiveClient % count;
|
||||
|
||||
trap_Cmd_GiveClientItem ( clients[gametype.bombGiveClient], ITEM_BOMB );
|
||||
gametype.firstFrame = qfalse;
|
||||
|
||||
// Next time use the next client in the list
|
||||
gametype.bombGiveClient = (gametype.bombGiveClient + 1 ) % count;
|
||||
}
|
||||
}
|
||||
|
||||
if ( gametype.bombPlantTime )
|
||||
{
|
||||
static const int slowTime = 1000;
|
||||
static const int fastTime = 100;
|
||||
|
||||
if ( !gametype.bombBeepTime || gametype.time > gametype.bombBeepTime )
|
||||
{
|
||||
float addTime;
|
||||
|
||||
addTime = (float)(gametype.bombPlantTime - gametype.time) / (float)(gt_bombFuseTime.integer * 1000);
|
||||
addTime = fastTime + (addTime * (float)(slowTime - fastTime) );
|
||||
|
||||
gametype.bombBeepTime = gametype.time + (int)addTime;
|
||||
|
||||
trap_Cmd_StartSound ( gametype.bombBeepSound, gametype.bombPlantOrigin );
|
||||
|
||||
addTime = (float)(gametype.bombPlantTime - gametype.time) / (float)(gt_bombFuseTime.integer * 1000);
|
||||
addTime = 6.0f - 6.0f * addTime ;
|
||||
trap_Cmd_SetHUDIcon ( 0, gametype.iconBombPlanted[ Com_Clamp ( 0, 6, (int)addTime ) ] );
|
||||
}
|
||||
}
|
||||
|
||||
if ( gametype.bombPlantTime && gametype.time > gametype.bombPlantTime )
|
||||
{
|
||||
static vec3_t up = {0,0,1};
|
||||
int clients[MAX_CLIENTS];
|
||||
int count;
|
||||
|
||||
trap_Cmd_PlayEffect ( gametype.bombExplodeEffect, gametype.bombPlantOrigin, up );
|
||||
trap_Cmd_UseTargets ( gametype.bombPlantTarget );
|
||||
trap_Cmd_ResetItem ( ITEM_PLANTED_BOMB );
|
||||
|
||||
if ( !gametype.roundOver )
|
||||
{
|
||||
trap_Cmd_AddTeamScore ( TEAM_BLUE, 1 );
|
||||
trap_Cmd_TextMessage ( -1, "Blue team has destroyed the target!" );
|
||||
trap_Cmd_StartGlobalSound ( gametype.bombExplodedSound );
|
||||
trap_Cmd_Restart ( 5 );
|
||||
|
||||
// Give the guy who planted it some props
|
||||
if ( !gt_simpleScoring.integer )
|
||||
{
|
||||
trap_Cmd_AddClientScore ( gametype.bombPlantClient, 10 );
|
||||
}
|
||||
}
|
||||
|
||||
gametype.bombPlantTime = 0;
|
||||
|
||||
// Get the bomb client # so we can give the bomb to the same guy again
|
||||
count = trap_Cmd_GetClientList ( TEAM_BLUE, clients, 64 );
|
||||
if ( count )
|
||||
{
|
||||
for ( count--; count >= 0; count-- )
|
||||
{
|
||||
if ( clients[count] == gametype.bombPlantClient )
|
||||
{
|
||||
gametype.bombGiveClient = count;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gametype.roundOver = qtrue;
|
||||
}
|
||||
|
||||
GT_UpdateCvars ( );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
GT_Event
|
||||
|
||||
Handles all events sent to the gametype
|
||||
================
|
||||
*/
|
||||
int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int arg4 )
|
||||
{
|
||||
switch ( cmd )
|
||||
{
|
||||
case GTEV_ITEM_DEFEND:
|
||||
if ( !gt_simpleScoring.integer )
|
||||
{
|
||||
trap_Cmd_AddClientScore ( arg1, 5 );
|
||||
}
|
||||
return 0;
|
||||
|
||||
case GTEV_ITEM_STUCK:
|
||||
break;
|
||||
|
||||
case GTEV_ITEM_DROPPED:
|
||||
{
|
||||
char clientname[MAX_QPATH];
|
||||
trap_Cmd_GetClientName ( arg1, clientname, MAX_QPATH );
|
||||
trap_Cmd_TextMessage ( -1, va("%s has dropped the bomb!", clientname ) );
|
||||
break;
|
||||
}
|
||||
|
||||
case GTEV_ITEM_TOUCHED:
|
||||
if ( arg0 == ITEM_BOMB && arg2 == TEAM_BLUE )
|
||||
{
|
||||
char clientname[MAX_QPATH];
|
||||
trap_Cmd_GetClientName ( arg1, clientname, MAX_QPATH );
|
||||
trap_Cmd_TextMessage ( -1, va("%s has taken the bomb!", clientname ) );
|
||||
trap_Cmd_StartGlobalSound ( gametype.bombTakenSound );
|
||||
trap_Cmd_RadioMessage ( arg1, "got_it" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
case GTEV_ITEM_CANBEUSED:
|
||||
if ( arg0 == ITEM_PLANTED_BOMB && arg2 == TEAM_RED )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
case GTEV_TRIGGER_TOUCHED:
|
||||
return 0;
|
||||
|
||||
case GTEV_TRIGGER_CANBEUSED:
|
||||
if ( trap_Cmd_DoesClientHaveItem ( arg1, ITEM_BOMB ) )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
case GTEV_TIME_EXPIRED:
|
||||
trap_Cmd_TextMessage ( -1, "Red team has defended the bomb site!" );
|
||||
trap_Cmd_AddTeamScore ( TEAM_RED, 1 );
|
||||
trap_Cmd_Restart ( 5 );
|
||||
gametype.roundOver = qtrue;
|
||||
break;
|
||||
|
||||
case GTEV_TEAM_ELIMINATED:
|
||||
switch ( arg0 )
|
||||
{
|
||||
case TEAM_RED:
|
||||
trap_Cmd_TextMessage ( -1, "Red team eliminated!" );
|
||||
trap_Cmd_AddTeamScore ( TEAM_BLUE, 1 );
|
||||
trap_Cmd_Restart ( 5 );
|
||||
gametype.roundOver = qtrue;
|
||||
break;
|
||||
|
||||
case TEAM_BLUE:
|
||||
|
||||
// If the bomb is planted the defending team MUST defuse it.
|
||||
if ( !gametype.bombPlantTime )
|
||||
{
|
||||
trap_Cmd_TextMessage ( -1, "Blue team eliminated!" );
|
||||
trap_Cmd_AddTeamScore ( TEAM_RED, 1 );
|
||||
trap_Cmd_Restart ( 5 );
|
||||
gametype.roundOver = qtrue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case GTEV_ITEM_USED:
|
||||
{
|
||||
char name[128];
|
||||
trap_Cmd_ResetItem ( ITEM_PLANTED_BOMB );
|
||||
gametype.bombPlantTime = 0;
|
||||
gametype.bombBeepTime = 0;
|
||||
trap_Cmd_AddTeamScore ( TEAM_RED, 1 );
|
||||
trap_Cmd_GetClientName ( arg1, name, 128 );
|
||||
trap_Cmd_TextMessage ( -1, va("%s has defused the bomb!", name ) );
|
||||
trap_Cmd_StartGlobalSound ( gametype.bombExplodedSound );
|
||||
trap_Cmd_Restart ( 5 );
|
||||
gametype.roundOver = qtrue;
|
||||
|
||||
// Give the guy who defused it some props
|
||||
if ( !gt_simpleScoring.integer )
|
||||
{
|
||||
trap_Cmd_AddClientScore ( arg1, 10 );
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
case GTEV_TRIGGER_USED:
|
||||
{
|
||||
char name[128];
|
||||
|
||||
gametype.bombPlantTime = time + gt_bombFuseTime.integer * 1000;
|
||||
gametype.bombPlantClient = arg1;
|
||||
trap_Cmd_GetClientOrigin ( arg1, gametype.bombPlantOrigin );
|
||||
trap_Cmd_TakeClientItem ( arg1, ITEM_BOMB );
|
||||
trap_Cmd_SpawnItem ( ITEM_PLANTED_BOMB, gametype.bombPlantOrigin, vec3_origin );
|
||||
trap_Cmd_GetClientName ( arg1, name, 128 );
|
||||
trap_Cmd_TextMessage ( -1, va("%s has planted the bomb!", name ) );
|
||||
trap_Cmd_GetTriggerTarget ( arg0, gametype.bombPlantTarget, sizeof(gametype.bombPlantTarget) );
|
||||
trap_Cmd_SetHUDIcon ( 0, gametype.iconBombPlanted[0] );
|
||||
trap_Cmd_StartGlobalSound ( gametype.bombPlantedSound );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef GAMETYPE_HARD_LINKED
|
||||
// this is only here so the functions in q_shared.c and bg_*.c can link (FIXME)
|
||||
|
||||
void QDECL Com_Error( int level, const char *msg, ... )
|
||||
{
|
||||
va_list argptr;
|
||||
char text[1024];
|
||||
|
||||
va_start (argptr, msg);
|
||||
vsprintf (text, msg, argptr);
|
||||
va_end (argptr);
|
||||
|
||||
trap_Error( text );
|
||||
}
|
||||
|
||||
void QDECL Com_Printf( const char *msg, ... )
|
||||
{
|
||||
va_list argptr;
|
||||
char text[1024];
|
||||
|
||||
va_start (argptr, msg);
|
||||
vsprintf (text, msg, argptr);
|
||||
va_end (argptr);
|
||||
|
||||
trap_Print( text );
|
||||
}
|
||||
|
||||
#endif
|
|
@ -17,6 +17,7 @@ CFG=gt_dm - Win32 Debug SoF2
|
|||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "gt_dm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "gt_dm - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
|
@ -26,8 +27,38 @@ CPP=cl.exe
|
|||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "gt_dm - Win32 Debug SoF2"
|
||||
!IF "$(CFG)" == "gt_dm - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_dm_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_dm_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ELSEIF "$(CFG)" == "gt_dm - Win32 Debug SoF2"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug SoF2"
|
||||
# PROP BASE Intermediate_Dir "Debug SoF2"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "..\..\Debug"
|
||||
|
@ -51,6 +82,7 @@ LINK32=link.exe
|
|||
|
||||
# Begin Target
|
||||
|
||||
# Name "gt_dm - Win32 Debug"
|
||||
# Name "gt_dm - Win32 Debug SoF2"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
|
|
|
@ -22,9 +22,9 @@ set cc=..\..\..\..\bin\sof2lcc -A -DQ3_VM -DMISSIONPACK -S -Wf-target=bytecode -
|
|||
..\..\..\..\bin\sof2asm -f ../gt_elim
|
||||
@if errorlevel 1 goto quit
|
||||
|
||||
mkdir "..\..\..\..\base\vm"
|
||||
copy *.map "..\..\..\..\base\vm"
|
||||
copy *.qvm "..\..\..\..\base\vm"
|
||||
mkdir "..\..\..\Debug\base\MP\vm"
|
||||
copy *.map "..\..\..\Debug\base\MP\vm"
|
||||
copy *.qvm "..\..\..\Debug\base\MP\vm"
|
||||
|
||||
:quit
|
||||
cd ..
|
||||
|
|
|
@ -17,6 +17,7 @@ CFG=gt_inf - Win32 Debug SoF2
|
|||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "gt_inf - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "gt_inf - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
|
@ -26,8 +27,38 @@ CPP=cl.exe
|
|||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "gt_inf - Win32 Debug SoF2"
|
||||
!IF "$(CFG)" == "gt_inf - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_inf_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_inf_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ELSEIF "$(CFG)" == "gt_inf - Win32 Debug SoF2"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug SoF2"
|
||||
# PROP BASE Intermediate_Dir "Debug SoF2"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "..\..\Debug"
|
||||
|
@ -51,6 +82,7 @@ LINK32=link.exe
|
|||
|
||||
# Begin Target
|
||||
|
||||
# Name "gt_inf - Win32 Debug"
|
||||
# Name "gt_inf - Win32 Debug SoF2"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
|
|
|
@ -127,9 +127,9 @@ void GT_Init ( void )
|
|||
GT_RegisterCvars ( );
|
||||
|
||||
// Register the global sounds
|
||||
gametype.caseTakenSound = trap_Cmd_RegisterGlobalSound ( "sound/ctf_flag.mp3" );
|
||||
gametype.caseCaptureSound = trap_Cmd_RegisterGlobalSound ( "sound/ctf_win.mp3" );
|
||||
gametype.caseReturnSound = trap_Cmd_RegisterGlobalSound ( "sound/ctf_return.mp3" );
|
||||
gametype.caseTakenSound = trap_Cmd_RegisterSound ( "sound/ctf_flag.mp3" );
|
||||
gametype.caseCaptureSound = trap_Cmd_RegisterSound ( "sound/ctf_win.mp3" );
|
||||
gametype.caseReturnSound = trap_Cmd_RegisterSound ( "sound/ctf_return.mp3" );
|
||||
|
||||
// Register the items
|
||||
memset ( &itemDef, 0, sizeof(itemDef) );
|
||||
|
@ -239,6 +239,7 @@ int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int ar
|
|||
trap_Cmd_GetClientName ( arg1, clientname, MAX_QPATH );
|
||||
trap_Cmd_TextMessage ( -1, va("%s has escaped with the briefcase!", clientname ) );
|
||||
trap_Cmd_StartGlobalSound ( gametype.caseCaptureSound );
|
||||
trap_Cmd_TakeClientItem ( arg1, ITEM_BRIEFCASE );
|
||||
trap_Cmd_AddTeamScore ( arg2, 1 );
|
||||
|
||||
if ( !gt_simpleScoring.integer )
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue