Compare commits
No commits in common. "master" and "v1.0" have entirely different histories.
154 changed files with 2948 additions and 56229 deletions
Binary file not shown.
140
US-PC-EULA Level-Editor.rtf
Normal file
140
US-PC-EULA Level-Editor.rtf
Normal file
|
@ -0,0 +1,140 @@
|
|||
{\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
3768
base/maps/heli.map
File diff suppressed because it is too large
Load diff
45507
base/maps/kam6.map
45507
base/maps/kam6.map
File diff suppressed because it is too large
Load diff
|
@ -1,48 +0,0 @@
|
|||
//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" );
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
//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" );
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
//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" );
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
//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" );
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
//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" );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
//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" );
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
//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
BIN
bin/AnimatEd.exe
Binary file not shown.
536
bin/BehavEd.bhc
536
bin/BehavEd.bhc
|
@ -1,536 +0,0 @@
|
|||
/*
|
||||
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
BIN
bin/BehavEd.exe
Binary file not shown.
Binary file not shown.
BIN
bin/IBIze.exe
BIN
bin/IBIze.exe
Binary file not shown.
BIN
bin/MD3View.exe
BIN
bin/MD3View.exe
Binary file not shown.
|
@ -1,18 +0,0 @@
|
|||
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
BIN
bin/SklView.exe
Binary file not shown.
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
C:\SDK
|
|
@ -96,11 +96,31 @@ 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
|
||||
*/
|
||||
|
@ -116,11 +136,6 @@ 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)
|
||||
*/
|
||||
|
||||
|
@ -324,11 +339,6 @@ 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
|
||||
|
@ -457,14 +467,6 @@ 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
|
||||
|
@ -535,34 +537,4 @@ 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 +0,0 @@
|
|||
C:\SDK
|
42
bin/sof2.qe4
42
bin/sof2.qe4
|
@ -1,42 +0,0 @@
|
|||
{
|
||||
"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"
|
||||
}
|
23
bin/sof2mp.qe4.duplicate1
Normal file
23
bin/sof2mp.qe4.duplicate1
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"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"
|
||||
|
||||
}
|
||||
|
Binary file not shown.
BIN
bin/striped.exe
BIN
bin/striped.exe
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
|
||||
|
|
|
@ -3,45 +3,6 @@ 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>
|
||||
|
@ -66,7 +27,7 @@ Package=<4>
|
|||
|
||||
###############################################################################
|
||||
|
||||
Project: "gt_ctf"=.\gametype\gt_ctf\gt_ctf.dsp - Package Owner=<4>
|
||||
Project: "SoF2ui"=.\ui\sof2_ui.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
|
@ -78,7 +39,43 @@ Package=<4>
|
|||
|
||||
###############################################################################
|
||||
|
||||
Project: "gt_dem"=.\gametype\gt_dem\gt_dem.dsp - Package Owner=<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>
|
||||
{{{
|
||||
|
@ -138,18 +135,6 @@ 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 debug\base\mp\vm
|
||||
@del /q ..\base\vm
|
||||
@cd game
|
||||
call game.bat
|
||||
@cd ..\cgame
|
||||
|
@ -12,8 +12,6 @@ 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
|
||||
|
@ -38,8 +36,6 @@ 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
|
||||
|
@ -85,11 +81,6 @@ 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,8 +112,6 @@ 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_M84_GRENADE;
|
||||
cg.weaponSelect = WP_M67_GRENADE;
|
||||
CG_PrevWeapon ( qfalse, exclude );
|
||||
|
||||
// Send server comand
|
||||
|
@ -300,27 +300,6 @@ 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) );
|
||||
|
@ -392,12 +371,6 @@ 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 );
|
||||
}
|
||||
|
||||
|
@ -411,12 +384,6 @@ 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 );
|
||||
}
|
||||
|
||||
|
@ -586,7 +553,6 @@ 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,9 +273,6 @@ void CG_DrawRadar ( void )
|
|||
break;
|
||||
|
||||
case ET_PLAYER:
|
||||
{
|
||||
vec4_t color;
|
||||
|
||||
cl = &cgs.clientinfo[ cent->currentState.number ];
|
||||
|
||||
// not valid then dont draw it
|
||||
|
@ -284,15 +281,6 @@ 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;
|
||||
|
@ -300,16 +288,16 @@ void CG_DrawRadar ( void )
|
|||
scale = ((cg.time - cl->mLastChatTime) / (float)RADAR_CHAT_DURATION);
|
||||
scale *= scale;
|
||||
|
||||
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];
|
||||
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];
|
||||
trap_R_SetColor ( finalColor );
|
||||
scale += 1.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
trap_R_SetColor ( color );
|
||||
trap_R_SetColor ( teamColor );
|
||||
scale = 1.0;
|
||||
}
|
||||
|
||||
|
@ -320,7 +308,6 @@ void CG_DrawRadar ( void )
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
trap_R_SetColor ( colorWhite );
|
||||
CG_DrawRotatePic2( RADAR_X + RADAR_RADIUS, RADAR_Y + RADAR_RADIUS, arrow_w, arrow_h,
|
||||
|
@ -337,22 +324,6 @@ 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 )
|
||||
{
|
||||
|
@ -372,71 +343,12 @@ static void CG_DrawTeamScores ( float y )
|
|||
Com_sprintf (scores[1], sizeof(scores[1]), "%i", cgs.scores2);
|
||||
}
|
||||
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=====================
|
||||
|
@ -1038,7 +950,6 @@ CG_DrawCenterText
|
|||
static void CG_DrawCenterText ( void )
|
||||
{
|
||||
int w;
|
||||
int h;
|
||||
|
||||
if ( cgs.gametypeMessageTime < cg.time )
|
||||
{
|
||||
|
@ -1047,8 +958,7 @@ static void CG_DrawCenterText ( void )
|
|||
}
|
||||
|
||||
w = trap_R_GetTextWidth( cgs.gametypeMessage, cgs.media.hudFont, 0.43f, 0 );
|
||||
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 );
|
||||
CG_DrawText ( (SCREEN_WIDTH - w) / 2, cg_centerY.integer, cgs.media.hudFont, 0.43f, colorWhite, cgs.gametypeMessage, 0, DT_OUTLINE );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1073,11 +983,6 @@ 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) )
|
||||
|
@ -1111,20 +1016,8 @@ 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;
|
||||
|
@ -1355,11 +1248,6 @@ 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 );
|
||||
|
||||
|
@ -1493,7 +1381,7 @@ static void CG_DrawWarmup( void )
|
|||
}
|
||||
|
||||
w = trap_R_GetTextWidth(s, cgs.media.hudFont, 0.53f, 0 );
|
||||
CG_DrawText (320 - w / 2, 155, cgs.media.hudFont, 0.53f, colorWhite, s, 0, DT_OUTLINE );
|
||||
CG_DrawText (320 - w / 2, 105, cgs.media.hudFont, 0.53f, colorWhite, s, 0, DT_OUTLINE );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1555,7 +1443,7 @@ static void CG_DrawChat ( void )
|
|||
}
|
||||
else
|
||||
{
|
||||
y = 380;
|
||||
y = 395;
|
||||
x = 35;
|
||||
}
|
||||
|
||||
|
@ -1702,39 +1590,6 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -1788,7 +1643,6 @@ static void CG_Draw2D( void )
|
|||
CG_DrawSpectator();
|
||||
CG_DrawCrosshair();
|
||||
CG_DrawCrosshairNames();
|
||||
CG_DrawHUDIcons();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1799,7 +1653,6 @@ static void CG_Draw2D( void )
|
|||
|
||||
if ( !cg.showScores )
|
||||
{
|
||||
CG_DrawHUDIcons();
|
||||
CG_DrawTimedMenus();
|
||||
CG_DrawCrosshair();
|
||||
CG_DrawCrosshairNames();
|
||||
|
@ -1816,15 +1669,16 @@ 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
|
||||
|
@ -1872,7 +1726,7 @@ void CG_DrawActive( stereoFrame_t stereoView )
|
|||
}
|
||||
|
||||
// Popup the objectives scren if we need to
|
||||
if( cg.popupObjectives && !cg.demoPlayback)
|
||||
if( cg.popupObjectives )
|
||||
{
|
||||
char temp[MAX_INFO_STRING];
|
||||
char lastobjectives[MAX_INFO_STRING];
|
||||
|
|
|
@ -884,7 +884,6 @@ static void CG_AddCEntity( centity_t *cent )
|
|||
break;
|
||||
|
||||
case ET_MOVER:
|
||||
case ET_WALL:
|
||||
CG_Mover( cent );
|
||||
break;
|
||||
|
||||
|
|
|
@ -229,7 +229,6 @@ 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:
|
||||
|
@ -247,7 +246,11 @@ 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:
|
||||
|
@ -342,27 +345,22 @@ 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;
|
||||
|
||||
|
@ -374,45 +372,31 @@ 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_SIG551:
|
||||
case MOD_M4_ASSAULT_RIFLE:
|
||||
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:
|
||||
|
@ -566,11 +550,6 @@ 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 ++ )
|
||||
{
|
||||
|
@ -792,7 +771,6 @@ 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;
|
||||
|
@ -805,7 +783,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|ITEM_QUIETPICKUP);
|
||||
index = es->eventParm & ~ITEM_AUTOSWITCHBIT;
|
||||
|
||||
if ( index < 1 || index >= bg_numItems )
|
||||
{
|
||||
|
@ -814,7 +792,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
|
|||
|
||||
item = &bg_itemlist[ index ];
|
||||
|
||||
if ( event != EV_ITEM_PICKUP_QUIET && item->pickup_sound )
|
||||
if ( item->pickup_sound )
|
||||
{
|
||||
trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound ), -1, -1 );
|
||||
}
|
||||
|
@ -954,7 +932,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 && !cg_synchronousClients.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) )
|
||||
if ( !(cg_antiLag.integer && cg_impactPrediction.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) )
|
||||
{
|
||||
// eventParm contains the direction byte and the material id
|
||||
ByteToDir( (es->eventParm >> MATERIAL_BITS), dir );
|
||||
|
@ -985,7 +963,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
|
|||
}
|
||||
|
||||
#ifdef _SOF2_FLESHIMPACTPREDICTION
|
||||
if ( !(cg_antiLag.integer && cg_impactPrediction.integer >= 2 && !!cg_synchronousClients.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) )
|
||||
if ( !(cg_antiLag.integer && cg_impactPrediction.integer >= 2 && es->otherEntityNum == cg.predictedPlayerState.clientNum ) )
|
||||
#endif
|
||||
{
|
||||
int fxtype = MATERIAL_FLESH;
|
||||
|
|
|
@ -39,18 +39,9 @@ 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,7 +236,6 @@ 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
|
||||
|
@ -293,8 +292,6 @@ 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)
|
||||
|
@ -383,7 +380,10 @@ 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_SMOHG92_GRENADE:
|
||||
case WP_M67_GRENADE:
|
||||
case WP_F1_GRENADE:
|
||||
case WP_L2A2_GRENADE:
|
||||
case WP_MDN11_GRENADE:
|
||||
CG_AddGore(PGORE_SHRAPNEL, flrand( 14.0f, 17.0f),
|
||||
hitloc, hitdirection, entnum, entposition, entangle, ghoul2);
|
||||
if (cg_goreDetail.integer>1)
|
||||
|
@ -396,6 +396,7 @@ 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;
|
||||
|
@ -1182,16 +1183,14 @@ 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)
|
||||
{
|
||||
|
@ -1218,7 +1217,8 @@ 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,19 +265,7 @@ 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,
|
||||
|
@ -301,15 +289,6 @@ 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,8 +302,6 @@ 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
|
||||
|
@ -375,7 +373,6 @@ typedef struct
|
|||
float radius[MAX_ITEM_MODELS];
|
||||
|
||||
void* boltModel;
|
||||
void* useModel;
|
||||
|
||||
} itemInfo_t;
|
||||
|
||||
|
@ -712,7 +709,6 @@ typedef struct
|
|||
int timelimit;
|
||||
int maxclients;
|
||||
qboolean friendlyFire;
|
||||
qboolean punkbuster;
|
||||
char mapname[MAX_QPATH];
|
||||
char gameover[MAX_QPATH];
|
||||
|
||||
|
@ -766,8 +762,6 @@ typedef struct
|
|||
float mIRDist;
|
||||
float mIRSeeThrough;
|
||||
|
||||
int hudIcons[MAX_HUDICONS];
|
||||
|
||||
} cgs_t;
|
||||
|
||||
//==============================================================================
|
||||
|
@ -793,11 +787,9 @@ 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;
|
||||
|
@ -889,8 +881,6 @@ extern vmCvar_t cg_bodyTime;
|
|||
|
||||
extern vmCvar_t rw_enabled;
|
||||
|
||||
extern vmCvar_t cg_zoomWeaponChange;
|
||||
|
||||
//
|
||||
// cg_main.c
|
||||
//
|
||||
|
@ -906,8 +896,6 @@ 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,7 +27,6 @@ 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 );
|
||||
|
||||
/*
|
||||
================
|
||||
|
@ -133,41 +132,11 @@ 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;
|
||||
|
@ -226,6 +195,7 @@ 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;
|
||||
|
@ -241,9 +211,7 @@ 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;
|
||||
|
@ -334,8 +302,6 @@ vmCvar_t cg_weaponMenuFast;
|
|||
|
||||
vmCvar_t cg_bodyTime;
|
||||
|
||||
vmCvar_t cg_zoomWeaponChange;
|
||||
|
||||
vmCvar_t rw_enabled;
|
||||
|
||||
typedef struct
|
||||
|
@ -354,6 +320,8 @@ 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 },
|
||||
|
@ -367,9 +335,7 @@ 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 },
|
||||
|
@ -472,8 +438,6 @@ 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] );
|
||||
|
@ -509,7 +473,6 @@ 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 );
|
||||
|
@ -553,59 +516,6 @@ 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
|
||||
|
@ -1943,7 +1853,7 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum )
|
|||
CG_InitHitModel( );
|
||||
|
||||
CG_LoadingString( "graphics" );
|
||||
BG_ParseInviewFile ( cgs.pickupsDisabled );
|
||||
BG_ParseInviewFile ( );
|
||||
CG_RegisterGraphics ( );
|
||||
|
||||
// CG_RegisterMission ( );
|
||||
|
@ -1975,16 +1885,10 @@ 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,7 +57,13 @@ static void CG_DrawPlayerSniperMagnification ( rectDef_t *rect, qhandle_t font,
|
|||
{
|
||||
const char* mag;
|
||||
|
||||
mag = weaponData[cg.predictedPlayerState.weapon].zoom[cg.predictedPlayerState.zoomFov].name;
|
||||
switch ( cg.predictedPlayerState.zoomFov )
|
||||
{
|
||||
default:
|
||||
case 20: mag = "5x"; break;
|
||||
case 10: mag = "10x"; break;
|
||||
case 5: mag = "20x"; break;
|
||||
}
|
||||
|
||||
// Center the text
|
||||
CG_DrawText (rect->x, rect->y, font, scale, color, mag, 0, 0 );
|
||||
|
@ -299,15 +305,7 @@ 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.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 );
|
||||
}
|
||||
cgs.gameIcons [ cg.predictedPlayerState.generic1 ] );
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
@ -318,12 +316,6 @@ 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 ++ )
|
||||
|
@ -568,19 +560,6 @@ 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 )
|
||||
{
|
||||
|
@ -603,14 +582,11 @@ 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 )
|
||||
{
|
||||
|
@ -633,7 +609,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.weapon == WP_MSG90A1 && (cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) )
|
||||
if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED )
|
||||
{
|
||||
visible = qfalse;
|
||||
}
|
||||
|
@ -649,12 +625,7 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param )
|
|||
// Draw the weapon info when we arent zoomed
|
||||
else if ( flags & CG_SHOW_HUD_WEAPONINFO )
|
||||
{
|
||||
qboolean zoomed = qfalse;
|
||||
if ( cg.predictedPlayerState.weapon == WP_MSG90A1 && (cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) )
|
||||
{
|
||||
zoomed = qtrue;
|
||||
}
|
||||
visible = (cg.showScores||zoomed)?qfalse:qtrue;
|
||||
visible = (cg.showScores||(cg.predictedPlayerState.pm_flags&PMF_ZOOMED))?qfalse:qtrue;
|
||||
flags &= ~(CG_SHOW_HUD_WEAPONINFO);
|
||||
}
|
||||
else if (flags & CG_SHOW_ANYTEAMGAME)
|
||||
|
|
119
code/cgame/cg_playeranim.c
Normal file
119
code/cgame/cg_playeranim.c
Normal file
|
@ -0,0 +1,119 @@
|
|||
#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;
|
||||
}
|
0
code/cgame/cg_playeranimate.c
Normal file
0
code/cgame/cg_playeranimate.c
Normal file
|
@ -284,22 +284,32 @@ static void CG_SetDeferredClientInfo( clientInfo_t *ci )
|
|||
int i;
|
||||
clientInfo_t *match;
|
||||
|
||||
// spectators can use any skin
|
||||
if ( ci->team == TEAM_SPECTATOR )
|
||||
{
|
||||
/*
|
||||
// If someone else is already the same models and skins we
|
||||
// can just load the client info
|
||||
for ( i = 0 ; i < cgs.maxclients ; i++ )
|
||||
{
|
||||
match = &cgs.clientinfo[ i ];
|
||||
if ( !match->infoValid )
|
||||
|
||||
// Cant steal the model from invalid or deferred clients
|
||||
if ( !match->infoValid || match->deferred )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
ci->deferred = qtrue;
|
||||
CG_CopyClientInfoModel( match, ci );
|
||||
// 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 );
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// Try to use any skin from the team they are joining
|
||||
if ( cgs.gametypeData->teams )
|
||||
|
@ -578,7 +588,6 @@ 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 )
|
||||
{
|
||||
|
@ -591,6 +600,8 @@ 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;
|
||||
|
@ -599,20 +610,6 @@ 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 );
|
||||
}
|
||||
|
||||
|
@ -874,12 +871,21 @@ static void CG_UpdatePlayerAnimations ( centity_t* cent )
|
|||
CG_PlayerGametypeItems
|
||||
===============
|
||||
*/
|
||||
void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles, int rf )
|
||||
void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles )
|
||||
{
|
||||
clientInfo_t *ci = &cgs.clientinfo[cent->currentState.clientNum];
|
||||
int i;
|
||||
int rf;
|
||||
|
||||
rf = rf & RF_THIRD_PERSON;
|
||||
if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson )
|
||||
{
|
||||
// only show in mirrors
|
||||
rf = RF_THIRD_PERSON;
|
||||
}
|
||||
else
|
||||
{
|
||||
rf = 0;
|
||||
}
|
||||
|
||||
// If the player is wearing goggles then draw them on their head
|
||||
if ( cent->currentState.eFlags & EF_GOGGLES )
|
||||
|
@ -928,10 +934,7 @@ void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles, int rf )
|
|||
memset ( &item, 0, sizeof(item) );
|
||||
item.renderfx = rf | RF_MINLIGHT;
|
||||
item.ghoul2 = cg_items[ MODELINDEX_GAMETYPE_ITEM + i ].boltModel;
|
||||
if ( !G2_PositionEntityOnBolt ( &item, cent->ghoul2, 0, ci->boltGametypeItems[i], cent->lerpOrigin, angles, cent->modelScale ) )
|
||||
{
|
||||
ci->boltGametypeItems[i] = -1;
|
||||
}
|
||||
G2_PositionEntityOnBolt ( &item, cent->ghoul2, 0, ci->boltGametypeItems[i], cent->lerpOrigin, angles, cent->modelScale );
|
||||
trap_R_AddRefEntityToScene(&item);
|
||||
}
|
||||
}
|
||||
|
@ -945,54 +948,28 @@ 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
|
||||
else if ( !force && cent->currentState.weapon == cent->pe.weapon )
|
||||
{
|
||||
if ( -1 != trap_G2API_GetBoltIndex ( cent->ghoul2, cent->pe.weaponModelSpot ) )
|
||||
if ( !force && cent->currentState.weapon == cent->pe.weapon )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// Ensure the weapon is registered
|
||||
CG_RegisterWeapon ( cent->currentState.weapon );
|
||||
|
||||
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 )
|
||||
// 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 )
|
||||
{
|
||||
trap_G2API_DetachG2Model ( cent->ghoul2, cent->pe.weaponModelSpot );
|
||||
trap_G2API_RemoveGhoul2Model( ¢->ghoul2, cent->pe.weaponModelSpot );
|
||||
cent->pe.weaponModelSpot = 0;
|
||||
}
|
||||
|
||||
// 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 );
|
||||
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 );
|
||||
trap_G2API_SetBoltInfo(cent->ghoul2, cent->pe.weaponModelSpot, ci->boltWorldWeapon );
|
||||
trap_G2API_AttachG2Model(cent->ghoul2, cent->pe.weaponModelSpot, cent->ghoul2, ci->boltWorldWeapon, 0);
|
||||
|
||||
|
@ -1008,6 +985,9 @@ void CG_UpdatePlayerWeaponModel ( centity_t* cent, qboolean force )
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Update the weapon in the player entity
|
||||
cent->pe.weapon = cent->currentState.weapon;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1221,7 +1201,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, renderfx );
|
||||
CG_PlayerGametypeItems ( cent, cent->pe.ghoulLegsAngles );
|
||||
|
||||
VectorCopy ( save, cent->lerpOrigin );
|
||||
}
|
||||
|
@ -1235,11 +1215,6 @@ 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;
|
||||
|
||||
|
@ -1251,7 +1226,6 @@ 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];
|
||||
|
@ -1264,12 +1238,6 @@ 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 ( weaponData[ops->weapon].zoom[ops->zoomFov].fov && (weaponData[ps->weapon].zoom[ps->zoomFov].fov != weaponData[ops->weapon].zoom[ops->zoomFov].fov) )
|
||||
if ( ops->zoomFov && (ps->zoomFov != ops->zoomFov) )
|
||||
{
|
||||
trap_S_StartLocalSound ( cgs.media.zoomSound, CHAN_AUTO );
|
||||
}
|
||||
|
@ -252,9 +252,6 @@ 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,7 +369,6 @@ static void CG_TouchItem( centity_t *cent )
|
|||
{
|
||||
gitem_t *item;
|
||||
qboolean autoswitch = qfalse;
|
||||
int eventID;
|
||||
|
||||
if ( !cg_predictItems.integer )
|
||||
{
|
||||
|
@ -414,17 +413,8 @@ 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( eventID, cent->currentState.modelindex|(autoswitch?ITEM_AUTOSWITCHBIT:0) , &cg.predictedPlayerState);
|
||||
BG_AddPredictableEventToPlayerstate( EV_ITEM_PICKUP, 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,11 +344,6 @@ typedef enum
|
|||
|
||||
CG_MAP_CHANGE,
|
||||
|
||||
CG_VOICE_EVENT,
|
||||
|
||||
CG_GET_TEAM_COUNT,
|
||||
CG_GET_TEAM_SCORE,
|
||||
|
||||
} cgameExport_t;
|
||||
|
||||
// CG_POINT_CONTENTS
|
||||
|
|
|
@ -90,7 +90,6 @@ 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 );
|
||||
|
||||
|
@ -98,7 +97,6 @@ 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 );
|
||||
|
@ -219,8 +217,6 @@ 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 ) );
|
||||
|
@ -231,11 +227,6 @@ 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 ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -378,10 +369,6 @@ 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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -682,6 +669,8 @@ 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,6 +27,8 @@ static void CG_ResetEntity( centity_t *cent )
|
|||
{
|
||||
CG_ResetPlayerEntity( cent );
|
||||
}
|
||||
|
||||
cent->pe.weapon = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -588,6 +588,7 @@ static void CG_OffsetFirstPersonView( void )
|
|||
float f;
|
||||
vec3_t predictedVelocity;
|
||||
int timeDelta;
|
||||
vec3_t right;
|
||||
|
||||
if ( cg.snap->ps.pm_type == PM_INTERMISSION ) {
|
||||
return;
|
||||
|
@ -731,8 +732,8 @@ static void CG_OffsetFirstPersonView( void )
|
|||
|
||||
leanOffset = (float)(cg.predictedPlayerState.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET;
|
||||
angles[ROLL] += leanOffset / 4;
|
||||
|
||||
BG_ApplyLeanOffset ( &cg.predictedPlayerState, origin );
|
||||
AngleVectors( cg.predictedPlayerState.viewangles, NULL, right, NULL );
|
||||
VectorMA( origin, leanOffset, right, origin );
|
||||
}
|
||||
|
||||
// Make sure view doesnt invert on itself
|
||||
|
@ -855,7 +856,7 @@ static int CG_CalcFov( void ) {
|
|||
|
||||
if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED )
|
||||
{
|
||||
zoomFov = (float)weaponData[cg.predictedPlayerState.weapon].zoom[cg.predictedPlayerState.zoomFov].fov;
|
||||
zoomFov = (float)cg.predictedPlayerState.zoomFov;
|
||||
|
||||
if (!cg.predictedPlayerState.pm_flags & PMF_ZOOM_LOCKED )
|
||||
{
|
||||
|
@ -884,8 +885,6 @@ 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 )
|
||||
{
|
||||
|
@ -893,7 +892,7 @@ static int CG_CalcFov( void ) {
|
|||
}
|
||||
else
|
||||
{
|
||||
fov_x = zoomFov + f * ( fov_x - zoomFov );
|
||||
fov_x = cg.predictedPlayerState.zoomFov + f * ( fov_x - cg.predictedPlayerState.zoomFov );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1285,16 +1284,9 @@ 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);
|
||||
|
@ -1313,7 +1305,6 @@ 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 && weaponNum != WP_MP5 )
|
||||
if ( attackInfo->muzzleEffect )
|
||||
{
|
||||
trap_R_AddLightToScene( flash.origin, 200, 0.6f, 0.4f, 0.2f );
|
||||
}
|
||||
|
@ -382,7 +382,6 @@ void CG_UpdateViewWeaponSurfaces ( playerState_t* ps )
|
|||
break;
|
||||
|
||||
case WP_M1911A1_PISTOL:
|
||||
case WP_SILVER_TALON:
|
||||
case WP_USSOCOM_PISTOL:
|
||||
{
|
||||
int forward;
|
||||
|
@ -504,12 +503,6 @@ 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;
|
||||
|
||||
|
@ -657,7 +650,7 @@ void CG_AddViewWeapon(playerState_t *ps)
|
|||
}
|
||||
|
||||
// Add a dlight when there is a muzzle effect
|
||||
if ( attackInfo->muzzleEffect && ps->weapon != WP_MP5 )
|
||||
if ( attackInfo->muzzleEffect )
|
||||
{
|
||||
trap_R_AddLightToScene( flash.origin, 200, 0.6f, 0.4f, 0.2f );
|
||||
}
|
||||
|
@ -730,11 +723,6 @@ void CG_NextWeapon ( qboolean allowEmpty, int exclude )
|
|||
return;
|
||||
}
|
||||
|
||||
if ( cg.predictedPlayerState.stats[STAT_USEWEAPONDROP] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( cg.snap->ps.pm_flags & PMF_FOLLOW )
|
||||
{
|
||||
return;
|
||||
|
@ -805,11 +793,6 @@ void CG_PrevWeapon ( qboolean allowEmpty, int exclude )
|
|||
return;
|
||||
}
|
||||
|
||||
if ( cg.predictedPlayerState.stats[STAT_USEWEAPONDROP] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( cg.snap->ps.pm_flags & PMF_FOLLOW )
|
||||
{
|
||||
return;
|
||||
|
@ -878,11 +861,6 @@ void CG_Weapon_f( void )
|
|||
return;
|
||||
}
|
||||
|
||||
if ( cg.predictedPlayerState.stats[STAT_USEWEAPONDROP] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( (cg.snap->ps.pm_flags & PMF_FOLLOW) )
|
||||
{
|
||||
return;
|
||||
|
@ -973,7 +951,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_M84_GRENADE;
|
||||
cg.weaponSelect = WP_M67_GRENADE;
|
||||
CG_PrevWeapon ( qfalse, weapon );
|
||||
}
|
||||
|
||||
|
@ -1001,7 +979,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_synchronousClients.integer || !cg_impactPrediction.integer || (weaponData[ent->weapon].attack[attack].weaponFlags & PROJECTILE_FIRE))
|
||||
if ( cg_antiLag.integer < 1 || !cg_impactPrediction.integer || (weaponData[ent->weapon].attack[attack].weaponFlags & PROJECTILE_FIRE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -1020,7 +998,12 @@ void CG_PredictedBullet ( centity_t* cent, attackType_t attack )
|
|||
VectorCopy(cg.predictedPlayerState.viewangles, fireAngs);
|
||||
if ( cg.predictedPlayerState.pm_flags & PMF_LEANING )
|
||||
{
|
||||
BG_ApplyLeanOffset ( &cg.predictedPlayerState, start );
|
||||
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 );
|
||||
}
|
||||
|
||||
seed = cg.predictedPlayerState.stats[STAT_SEED];
|
||||
|
@ -1148,19 +1131,12 @@ void CG_FireWeapon( centity_t *cent, attackType_t attack )
|
|||
c = rand() % c;
|
||||
if ( attackInfo->flashSound[c] )
|
||||
{
|
||||
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 );
|
||||
trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, attackInfo->flashSound[c], -1, 2000 );
|
||||
}
|
||||
}
|
||||
|
||||
// Handle dissapearing bullets if this is the main guy firing
|
||||
if ( cent->currentState.number == cg.snap->ps.clientNum && cg.hitModel )
|
||||
if ( cent->currentState.number == cg.snap->ps.clientNum )
|
||||
{
|
||||
CG_PredictedBullet ( cent, attack );
|
||||
}
|
||||
|
@ -1353,8 +1329,12 @@ 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:
|
||||
|
||||
|
@ -1423,7 +1403,11 @@ 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)
|
||||
|
@ -1537,15 +1521,9 @@ 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
|
||||
chance = cg_tracerChance.value * 100.0f;
|
||||
float chance = cg_tracerChance.value * 100.0f;
|
||||
if ( rand()%100 > chance )
|
||||
{
|
||||
return;
|
||||
|
@ -1613,7 +1591,6 @@ 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 );
|
||||
}
|
||||
}
|
||||
|
@ -1774,7 +1751,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_AUTO,weaponInfo->otherWeaponSounds[i][0], -1, -1);
|
||||
trap_S_StartSound(NULL,ent->number,CHAN_WEAPON,weaponInfo->otherWeaponSounds[i][0], -1, -1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=SoF2cgame - Win32 Release SoF2
|
||||
CFG=SoF2cgame - Win32 SH Debug SoF2
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
|
@ -13,16 +13,19 @@ CFG=SoF2cgame - Win32 Release 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 Release SoF2"
|
||||
!MESSAGE NMAKE /f "sof2_cgame.mak" CFG="SoF2cgame - Win32 SH Debug 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
|
||||
|
@ -85,152 +88,562 @@ 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"
|
||||
|
@ -266,18 +679,10 @@ 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
|
||||
|
@ -343,6 +748,11 @@ 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,7 +726,6 @@ 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;
|
||||
|
@ -738,12 +737,14 @@ 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);
|
||||
|
||||
|
@ -3491,15 +3492,12 @@ 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:
|
||||
|
@ -3509,7 +3507,11 @@ 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,15 +1345,16 @@ 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_MP5
|
||||
6,//WP_SIG551
|
||||
6//WP_M15_GRENADE,
|
||||
};
|
||||
|
||||
int GetNearestVisibleWPToItem(vec3_t org, int ignore)
|
||||
|
|
|
@ -138,13 +138,6 @@ 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,27 +223,6 @@ 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
|
||||
*/
|
||||
|
@ -286,27 +265,6 @@ 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)
|
||||
|
@ -413,27 +371,6 @@ 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
|
||||
*/
|
||||
|
@ -497,6 +434,27 @@ 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
|
||||
*/
|
||||
|
@ -518,6 +476,69 @@ 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_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 },
|
||||
{ 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 },
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -143,12 +143,7 @@ void PM_TorsoAnimation( playerState_t* ps )
|
|||
{
|
||||
case WEAPON_SPAWNING:
|
||||
case WEAPON_READY:
|
||||
|
||||
if ( ps->stats[STAT_USEWEAPONDROP] )
|
||||
{
|
||||
PM_ContinueTorsoAnim ( ps, TORSO_USE );
|
||||
}
|
||||
else if ( (ps->pm_flags & PMF_ZOOMED) && weaponData[ps->weapon].animIdleZoomed )
|
||||
if ( (ps->pm_flags & PMF_ZOOMED) && weaponData[ps->weapon].animIdleZoomed )
|
||||
{
|
||||
PM_ContinueTorsoAnim ( ps, weaponData[ps->weapon].animIdleZoomed );
|
||||
}
|
||||
|
@ -1262,7 +1257,7 @@ void BG_PlayerAngles (
|
|||
AnglesSubtract( headAngles, lowerTorsoAngles, headAngles );
|
||||
AnglesSubtract( lowerTorsoAngles, legsAngles, lowerTorsoAngles );
|
||||
|
||||
if ( legs && ghoul2 )
|
||||
if ( legs )
|
||||
{
|
||||
AnglesToAxis( legsAngles, legs );
|
||||
|
||||
|
@ -1743,21 +1738,4 @@ 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 > 1 )
|
||||
else if ( pm->waterlevel )
|
||||
{
|
||||
drop += speed*pm_waterfriction*pm->waterlevel*pml.frametime;
|
||||
}
|
||||
|
@ -993,97 +993,6 @@ 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
|
||||
|
@ -1197,7 +1106,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 = 750;
|
||||
pm->ps->pm_time = 500;
|
||||
}
|
||||
|
||||
// create a local entity event to play the sound
|
||||
|
@ -2105,7 +2014,11 @@ 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:
|
||||
|
@ -2317,9 +2230,12 @@ 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 = 0;
|
||||
pm->ps->zoomTime = pm->ps->commandTime;
|
||||
pm->ps->pm_flags &= ~(PMF_ZOOM_FLAGS);
|
||||
}
|
||||
|
||||
// Clear the weapon time
|
||||
pm->ps->weaponTime = 0;
|
||||
|
@ -2329,7 +2245,7 @@ static void PM_BeginWeaponChange(int weapon)
|
|||
PM_AddEvent(EV_CHANGE_WEAPON);
|
||||
pm->ps->weaponstate = WEAPON_DROPPING;
|
||||
|
||||
if( pm->ps->weapon >= WP_M84_GRENADE && pm->ps->weapon <= WP_M15_GRENADE && pm->ps->clip[ATTACK_NORMAL][pm->ps->weapon] <= 0 )
|
||||
if( pm->ps->weapon >= WP_M67_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;
|
||||
|
@ -2375,14 +2291,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_M84_GRENADE && pm->ps->weapon <= WP_M15_GRENADE && pm->ps->clip[ATTACK_NORMAL][pm->ps->weapon] <=0 )
|
||||
if( pm->ps->weapon >= WP_M67_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(150,pm->ps->weaponTime);
|
||||
pm->ps->weaponTime = min(500,pm->ps->weaponTime);
|
||||
|
||||
PM_StartTorsoAnim( pm->ps, weaponData[pm->ps->weapon].animRaise, pm->ps->weaponAnimTime );
|
||||
}
|
||||
|
@ -2471,7 +2387,6 @@ PM_EndRefillClip
|
|||
void PM_EndRefillClip(void)
|
||||
{
|
||||
pm->ps->weaponstate=WEAPON_READY;
|
||||
pm->ps->weaponFireBurstCount = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2500,24 +2415,6 @@ 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] )
|
||||
{
|
||||
|
@ -2525,16 +2422,26 @@ 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;
|
||||
|
@ -2547,6 +2454,23 @@ 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;
|
||||
}
|
||||
|
||||
|
@ -2589,20 +2513,16 @@ 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 )
|
||||
{
|
||||
pm->ps->inaccuracy += weaponData[pm->ps->weapon].attack[attack].zoomInaccuracy;
|
||||
return;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -2822,12 +2742,6 @@ 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 )
|
||||
{
|
||||
|
@ -2943,6 +2857,11 @@ 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;
|
||||
|
@ -2954,7 +2873,11 @@ 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:
|
||||
|
@ -3016,7 +2939,6 @@ static void PM_Weapon( void )
|
|||
pm->ps->weaponstate=WEAPON_READY;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -3072,7 +2994,7 @@ static void PM_Weapon( void )
|
|||
|
||||
default:
|
||||
PM_EndRefillClip();
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(pm->ps->pm_flags & PMF_ZOOM_DEFER_RELOAD )
|
||||
|
@ -3107,7 +3029,7 @@ static void PM_Weapon( void )
|
|||
}
|
||||
|
||||
// Handle zooming in/out for sniper rifle.
|
||||
if( weaponData[pm->ps->weapon].zoom[0].fov )
|
||||
if(pm->ps->weapon==WP_MSG90A1)
|
||||
{
|
||||
if( (attackButtons&BUTTON_ALT_ATTACK) || (pm->ps->pm_flags & PMF_ZOOM_REZOOM) )
|
||||
{
|
||||
|
@ -3125,20 +3047,22 @@ static void PM_Weapon( void )
|
|||
{
|
||||
if(pm->cmd.buttons&BUTTON_ZOOMIN)
|
||||
{
|
||||
if ( pm->ps->zoomFov + 1 < ZOOMLEVEL_MAX && weaponData[pm->ps->weapon].zoom[pm->ps->zoomFov+1].fov )
|
||||
pm->ps->zoomFov = pm->ps->zoomFov >> 1;
|
||||
if ( pm->ps->zoomFov < 5)
|
||||
{
|
||||
pm->ps->zoomFov++;
|
||||
pm->ps->weaponTime=175;
|
||||
pm->ps->zoomFov = 5;
|
||||
}
|
||||
pm->ps->weaponTime=175;
|
||||
return;
|
||||
}
|
||||
else if(pm->cmd.buttons&BUTTON_ZOOMOUT)
|
||||
{
|
||||
if ( pm->ps->zoomFov > 0 )
|
||||
pm->ps->zoomFov = pm->ps->zoomFov << 1;
|
||||
if(pm->ps->zoomFov > 20 )
|
||||
{
|
||||
pm->ps->zoomFov--;
|
||||
pm->ps->weaponTime=175;
|
||||
pm->ps->zoomFov = 20;
|
||||
}
|
||||
pm->ps->weaponTime=175;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -3252,8 +3176,6 @@ static void PM_Weapon( void )
|
|||
return;
|
||||
}
|
||||
|
||||
pm->ps->pm_debounce |= PMD_ATTACK;
|
||||
|
||||
// Decrease the ammo
|
||||
(*ammoSource) -= attackData->fireAmount;
|
||||
|
||||
|
@ -3281,7 +3203,11 @@ 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:
|
||||
|
@ -3399,9 +3325,10 @@ 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, -20 );
|
||||
VectorSet( maxs, 6, 6, 20 );
|
||||
VectorSet( mins, -6, -6, -8 );
|
||||
VectorSet( maxs, 6, 6, 8 );
|
||||
|
||||
// since we're moving the camera over
|
||||
// check that move
|
||||
|
@ -3624,11 +3551,8 @@ void PmoveSingle (pmove_t *pmove) {
|
|||
}
|
||||
}
|
||||
|
||||
// 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]) )
|
||||
// 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)) )
|
||||
{
|
||||
if ( pm->cmd.forwardmove > 64 )
|
||||
{
|
||||
|
@ -3834,9 +3758,6 @@ void PmoveSingle (pmove_t *pmove) {
|
|||
// weapons
|
||||
PM_Weapon();
|
||||
|
||||
// Use
|
||||
PM_Use ( );
|
||||
|
||||
// torso animation
|
||||
PM_TorsoAnimation( pm->ps );
|
||||
|
||||
|
@ -3867,8 +3788,13 @@ 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 )
|
||||
{
|
||||
VectorCopy ( pm->ps->origin, pm->ps->pvsOrigin );
|
||||
BG_ApplyLeanOffset ( pm->ps, pm->ps->pvsOrigin );
|
||||
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 );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3964,18 +3890,11 @@ 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,11 +37,9 @@
|
|||
//#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.02g"
|
||||
#define GAME_VERSION "sof2mp-1.00g"
|
||||
#else
|
||||
// #define GAME_VERSION "sof2mp-1.00"
|
||||
#define GAME_VERSION "sof2mp-1.02"
|
||||
#define GAME_VERSION "sof2mp-1.00"
|
||||
#endif
|
||||
|
||||
#define DEFAULT_GRAVITY 800
|
||||
|
@ -67,7 +65,7 @@
|
|||
#define DEAD_PLAYER_Z_MAX -30
|
||||
|
||||
#define DUCK_ACCURACY_MODIFIER 0.75f
|
||||
#define JUMP_ACCURACY_MODIFIER 2.0f
|
||||
#define JUMP_ACCURACY_MODIFIER 1.5f
|
||||
|
||||
#define MINS_Z -46
|
||||
|
||||
|
@ -138,9 +136,7 @@ enum
|
|||
CS_TEAM_INFO = CS_ICONS + MAX_ICONS,
|
||||
CS_AMBIENT_SOUNDSETS = CS_TEAM_INFO + TEAM_NUM_TEAMS,
|
||||
|
||||
CS_HUDICONS = CS_AMBIENT_SOUNDSETS + MAX_AMBIENT_SOUNDSETS,
|
||||
|
||||
CS_MAX = CS_HUDICONS + MAX_HUDICONS,
|
||||
CS_MAX = CS_AMBIENT_SOUNDSETS + MAX_AMBIENT_SOUNDSETS
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -322,8 +318,6 @@ typedef enum
|
|||
TORSO_RELOAD_MM1_SHELL,
|
||||
TORSO_RELOAD_MM1_END,
|
||||
|
||||
TORSO_USE,
|
||||
|
||||
MAX_ANIMATIONS
|
||||
|
||||
} animNumber_t;
|
||||
|
@ -351,7 +345,6 @@ 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
|
||||
{
|
||||
|
@ -409,7 +402,6 @@ 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)
|
||||
|
@ -507,10 +499,6 @@ 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;
|
||||
|
||||
|
@ -531,9 +519,6 @@ 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;
|
||||
|
||||
|
||||
|
@ -622,7 +607,6 @@ typedef enum
|
|||
EV_WATER_CLEAR,
|
||||
|
||||
EV_ITEM_PICKUP, // normal item pickups are predictable
|
||||
EV_ITEM_PICKUP_QUIET, // quiet pickup
|
||||
|
||||
EV_NOAMMO,
|
||||
EV_CHANGE_WEAPON,
|
||||
|
@ -685,13 +669,6 @@ 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,
|
||||
|
@ -814,10 +791,6 @@ 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
|
||||
|
@ -970,7 +943,6 @@ typedef struct gametypeData_s
|
|||
const char* displayName;
|
||||
const char* script;
|
||||
const char* description;
|
||||
const char* basegametype;
|
||||
|
||||
respawnType_t respawnType;
|
||||
qboolean pickupsDisabled;
|
||||
|
@ -1050,7 +1022,7 @@ typedef struct SSkinTemplate
|
|||
#define MAX_MODEL_SOUNDS 8
|
||||
#define MAX_IDENTITIES 256
|
||||
#define MAX_OUTFITTINGS 64
|
||||
#define MAX_OUTFITTING_GROUPITEM 12
|
||||
#define MAX_OUTFITTING_GROUPITEM 10
|
||||
|
||||
typedef struct SModelSounds
|
||||
{
|
||||
|
@ -1096,7 +1068,7 @@ extern TIdentity bg_identities[];
|
|||
extern int bg_identityCount;
|
||||
extern goutfitting_t bg_outfittings[];
|
||||
extern int bg_outfittingCount;
|
||||
extern int bg_outfittingGroups[][MAX_OUTFITTING_GROUPITEM];
|
||||
extern int bg_outfittingGroups[][10];
|
||||
extern char *bg_weaponNames[WP_NUM_WEAPONS];
|
||||
extern stringID_table_t bg_animTable [MAX_ANIMATIONS+1];
|
||||
|
||||
|
@ -1113,7 +1085,6 @@ 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,23 +14,24 @@ 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];
|
||||
|
@ -46,33 +47,17 @@ 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,
|
||||
"7.62mm belt", // AMMO_762_BELT,
|
||||
"9mm|mp5", // AMMO_9_MP5
|
||||
"ANM14" // AMMO_ANM14,
|
||||
};
|
||||
|
||||
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];
|
||||
|
@ -81,7 +66,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 ( BG_GetRealAmmoName ( ammoNum ) );
|
||||
ammo->name = (char*)trap_VM_LocalStringAlloc ( ammoNames[ammoNum] );
|
||||
Q_strlwr ( ammo->name );
|
||||
|
||||
// Get the scale of the gore for this bullet
|
||||
|
@ -95,7 +80,8 @@ static qboolean BG_ParseAmmoStats(ammo_t ammoNum, void *group)
|
|||
|
||||
qboolean BG_InitAmmoStats(void)
|
||||
{
|
||||
void *GP2, *topGroup;
|
||||
void *GP2, *topGroup, *topSubs;
|
||||
char name[256];
|
||||
int i;
|
||||
|
||||
ammoData[AMMO_NONE].goreScale = 0.0f;
|
||||
|
@ -108,37 +94,30 @@ 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);
|
||||
if ( !Q_stricmp ( name, realName ) )
|
||||
for(i=0;i<AMMO_MAX;i++)
|
||||
{
|
||||
if (Q_stricmp(ammoNames[i], name) == 0)
|
||||
{
|
||||
BG_ParseAmmoStats(i, topSubs);
|
||||
break;
|
||||
}
|
||||
|
||||
topSubs = trap_GPG_GetNext(topSubs);
|
||||
}
|
||||
|
||||
if ( !topSubs )
|
||||
#ifdef _DEBUG
|
||||
if (i == AMMO_MAX)
|
||||
{
|
||||
Com_Printf("BG_InitAmmoStats: Unknown ammo: %s\n", BG_GetRealAmmoName ( i ) );
|
||||
Com_Printf("BG_InitAmmoStats: Unknown ammo: %s\n", name);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
topSubs = trap_GPG_GetNext(topSubs);
|
||||
}
|
||||
|
||||
trap_GP_Delete(&GP2);
|
||||
|
@ -146,7 +125,7 @@ qboolean BG_InitAmmoStats(void)
|
|||
return qtrue;
|
||||
}
|
||||
|
||||
static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void *attacksub, qboolean pickupsDisabled )
|
||||
static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void *attacksub )
|
||||
{
|
||||
void* sub;
|
||||
char tmpStr[256];
|
||||
|
@ -158,38 +137,6 @@ 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" ) )
|
||||
|
@ -201,19 +148,7 @@ 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++)
|
||||
{
|
||||
|
@ -253,8 +188,6 @@ 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);
|
||||
|
@ -373,7 +306,7 @@ static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void
|
|||
return qtrue;
|
||||
}
|
||||
|
||||
static qboolean BG_ParseWeaponStats(weapon_t weaponNum, void *group, qboolean pickupsDisabled )
|
||||
static qboolean BG_ParseWeaponStats(weapon_t weaponNum, void *group)
|
||||
{
|
||||
char tmpStr[256];
|
||||
weaponData_t *weapon;
|
||||
|
@ -409,15 +342,15 @@ static qboolean BG_ParseWeaponStats(weapon_t weaponNum, void *group, qboolean pi
|
|||
weapon->animReloadEnd = GetIDForString ( bg_animTable, tmpStr );
|
||||
|
||||
// primary attack
|
||||
BG_ParseAttackStats ( weaponNum, &weapon->attack[ATTACK_NORMAL], trap_GPG_FindSubGroup(group, "attack"), pickupsDisabled );
|
||||
BG_ParseAttackStats ( weaponNum, &weapon->attack[ATTACK_NORMAL], trap_GPG_FindSubGroup(group, "attack") );
|
||||
|
||||
// alternate attack
|
||||
BG_ParseAttackStats ( weaponNum, &weapon->attack[ATTACK_ALTERNATE], trap_GPG_FindSubGroup(group, "altattack"), pickupsDisabled );
|
||||
BG_ParseAttackStats ( weaponNum, &weapon->attack[ATTACK_ALTERNATE], trap_GPG_FindSubGroup(group, "altattack") );
|
||||
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
qboolean BG_InitWeaponStats( qboolean pickupsDisabled )
|
||||
qboolean BG_InitWeaponStats(void)
|
||||
{
|
||||
void *GP2, *topGroup, *topSubs;
|
||||
char name[256];
|
||||
|
@ -441,7 +374,7 @@ qboolean BG_InitWeaponStats( qboolean pickupsDisabled )
|
|||
{
|
||||
if (Q_stricmp(bg_weaponNames[i], name) == 0)
|
||||
{
|
||||
BG_ParseWeaponStats(i, topSubs, pickupsDisabled );
|
||||
BG_ParseWeaponStats(i, topSubs);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -991,7 +924,7 @@ static qboolean BG_ParseWeapon(weapon_t weapon, void *group)
|
|||
return qtrue;
|
||||
}
|
||||
|
||||
qboolean BG_ParseInviewFile( qboolean pickupsDisabled )
|
||||
qboolean BG_ParseInviewFile(void)
|
||||
{
|
||||
void *GP2, *topGroup, *topSubs, *group;
|
||||
char name[256], temp[256];
|
||||
|
@ -1065,7 +998,7 @@ qboolean BG_ParseInviewFile( qboolean pickupsDisabled )
|
|||
|
||||
BG_InitAmmoStats();
|
||||
|
||||
return BG_InitWeaponStats( pickupsDisabled );
|
||||
return BG_InitWeaponStats();
|
||||
}
|
||||
|
||||
TAnimWeapon *BG_GetInviewAnim(int weaponIdx,const char *animKey,int *animIndex)
|
||||
|
@ -1232,12 +1165,12 @@ void BG_CalculateBulletEndpoint ( vec3_t muzzlePoint, vec3_t fireAngs, float ina
|
|||
float f1;
|
||||
float f2;
|
||||
|
||||
f1 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
f2 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
f1 = (float)(Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
f2 = (float)(Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
fGaussianX = (f1-0.5f) + (f2-0.5f);
|
||||
|
||||
f1 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
f2 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
f1 = (float)(Q_rand ( seed ) % 15000) / 15000.0f;
|
||||
f2 = (float)(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,8 +48,7 @@ typedef enum
|
|||
MOD_SUICIDE,
|
||||
MOD_TEAMCHANGE,
|
||||
MOD_TARGET_LASER,
|
||||
MOD_TRIGGER_HURT,
|
||||
MOD_TRIGGER_HURT_NOSUICIDE
|
||||
MOD_TRIGGER_HURT
|
||||
|
||||
} meansOfDeath_t;
|
||||
|
||||
|
@ -63,27 +62,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,
|
||||
|
@ -104,14 +103,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,
|
||||
|
@ -146,16 +145,6 @@ 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];
|
||||
|
@ -176,7 +165,6 @@ 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
|
||||
|
@ -224,7 +212,6 @@ typedef struct weaponData_s
|
|||
|
||||
attackData_t attack[ATTACK_MAX];
|
||||
|
||||
zoomData_t zoom[ZOOMLEVEL_MAX];
|
||||
|
||||
} weaponData_t;
|
||||
|
||||
|
@ -368,7 +355,7 @@ extern TWeaponParseInfo weaponParseInfo[WP_NUM_WEAPONS];
|
|||
extern char weaponLeftHand[MAX_QPATH];
|
||||
extern char weaponRightHand[MAX_QPATH];
|
||||
|
||||
qboolean BG_ParseInviewFile ( qboolean );
|
||||
qboolean BG_ParseInviewFile ( void);
|
||||
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,7 +4,6 @@
|
|||
|
||||
#include "g_local.h"
|
||||
|
||||
|
||||
void P_SetTwitchInfo(gclient_t *client)
|
||||
{
|
||||
client->ps.painTime = level.time;
|
||||
|
@ -156,7 +155,7 @@ G_SetClientSound
|
|||
*/
|
||||
void G_SetClientSound( gentity_t *ent )
|
||||
{
|
||||
// ent->client->ps.loopSound = 0;
|
||||
ent->client->ps.loopSound = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -287,8 +286,6 @@ 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++ )
|
||||
|
@ -314,45 +311,6 @@ 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;
|
||||
|
@ -499,9 +457,6 @@ 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
|
||||
{
|
||||
|
@ -539,7 +494,6 @@ 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));
|
||||
|
@ -569,11 +523,6 @@ 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 ) )
|
||||
|
@ -588,28 +537,6 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -694,10 +621,6 @@ 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;
|
||||
|
||||
|
@ -723,30 +646,48 @@ use key pressed
|
|||
*/
|
||||
void G_Use ( gentity_t* ent )
|
||||
{
|
||||
if ( !ent->client->useEntity )
|
||||
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 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
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 ) )
|
||||
{
|
||||
// dead clients don't activate triggers!
|
||||
if ( ent->client->ps.stats[STAT_HEALTH] <= 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
gametype_item_use ( ent->client->useEntity, ent );
|
||||
return;
|
||||
}
|
||||
VectorSubtract( ent->client->ps.origin, range, mins );
|
||||
VectorAdd( ent->client->ps.origin, range, maxs );
|
||||
|
||||
// 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 ) )
|
||||
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++ )
|
||||
{
|
||||
return;
|
||||
hit = &g_entities[touch[i]];
|
||||
|
||||
if ( !hit->use )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
ent->client->useEntity->use ( ent->client->useEntity, ent, ent );
|
||||
// Misstion triggers can be used
|
||||
if ( !Q_stricmp ( hit->classname, "gametype_trigger" ) )
|
||||
{
|
||||
hit->use ( hit, ent, ent );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1035,7 +976,6 @@ 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 )
|
||||
|
@ -1132,15 +1072,6 @@ 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 )
|
||||
|
@ -1205,9 +1136,6 @@ 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;
|
||||
|
@ -1236,39 +1164,12 @@ 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 ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
|
@ -1386,24 +1287,17 @@ 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,17 +232,15 @@ void G_UndoAntiLag ( void )
|
|||
continue;
|
||||
}
|
||||
|
||||
if ( other->r.svFlags & SVF_INFLATED_BBOX )
|
||||
if ( other->r.svFlags & SVF_DOUBLED_BBOX )
|
||||
{
|
||||
// Put the hitbox back the way it was
|
||||
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.maxs[0] /= 2;
|
||||
other->r.maxs[1] /= 2;
|
||||
other->r.mins[0] /= 2;
|
||||
other->r.mins[1] /= 2;
|
||||
|
||||
other->r.mins[0] = other->client->minSave[0];
|
||||
other->r.mins[1] = other->client->minSave[1];
|
||||
|
||||
other->r.svFlags &= (~SVF_INFLATED_BBOX);
|
||||
other->r.svFlags &= (~SVF_DOUBLED_BBOX);
|
||||
}
|
||||
|
||||
G_UndoClientAntiLag ( other );
|
||||
|
@ -306,37 +304,13 @@ 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
|
||||
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
// Relink the entity into the world
|
||||
|
|
|
@ -182,23 +182,6 @@ 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,9 +176,7 @@ gspawn_t* G_SelectRandomSpawnPoint ( team_t team )
|
|||
return tfspawns[ rand() % tfcount ];
|
||||
}
|
||||
|
||||
i = rand() % count;
|
||||
|
||||
return spawns[ i ];
|
||||
return spawns[ rand() % count ];
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -738,8 +736,6 @@ 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 )
|
||||
{
|
||||
|
@ -758,14 +754,6 @@ 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 == ' ' )
|
||||
|
@ -892,11 +880,6 @@ 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;
|
||||
|
@ -940,34 +923,6 @@ 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;
|
||||
}
|
||||
|
||||
/*
|
||||
===========
|
||||
|
@ -989,8 +944,6 @@ 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;
|
||||
|
@ -1051,14 +1004,6 @@ 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" ) );
|
||||
|
||||
|
@ -1219,25 +1164,23 @@ 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");
|
||||
Com_sprintf ( ip, sizeof(ip), value );
|
||||
if ( G_FilterPacket( value ) )
|
||||
{
|
||||
return "Banned.";
|
||||
}
|
||||
|
||||
// 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(ip, "localhost") != 0))
|
||||
if ( !( isBot ) && (strcmp(value, "localhost") != 0))
|
||||
{
|
||||
// check for a password
|
||||
value = Info_ValueForKey (userinfo, "password");
|
||||
|
@ -1277,26 +1220,25 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot )
|
|||
}
|
||||
|
||||
// get and distribute relevent paramters
|
||||
G_LogPrintf( "ClientConnect: %i - %s [%s]\n", clientNum, ip, guid );
|
||||
G_LogPrintf( "ClientConnect: %i\n", clientNum );
|
||||
ClientUserinfoChanged( clientNum );
|
||||
|
||||
// don't do the "xxx connected" messages if they were caried over from previous level
|
||||
if ( firstTime )
|
||||
{
|
||||
trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " 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;
|
||||
|
@ -1368,17 +1310,6 @@ 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();
|
||||
}
|
||||
|
@ -1561,7 +1492,6 @@ 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) );
|
||||
|
@ -1574,7 +1504,7 @@ void ClientSpawn(gentity_t *ent)
|
|||
// Give the client their weapons depending on whether or not pickups are enabled
|
||||
if ( level.pickupsDisabled )
|
||||
{
|
||||
G_UpdateOutfitting ( index );
|
||||
G_UpdateOutfitting ( ent->s.number );
|
||||
|
||||
// Prevent the client from picking up a whole bunch of stuff
|
||||
client->ps.pm_flags |= PMF_LIMITED_INVENTORY;
|
||||
|
@ -1667,10 +1597,6 @@ 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;
|
||||
|
||||
|
@ -1682,12 +1608,6 @@ 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;
|
||||
|
@ -1708,6 +1628,12 @@ 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] )
|
||||
{
|
||||
|
@ -1913,51 +1839,3 @@ 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,36 +261,6 @@ 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
|
||||
|
@ -753,9 +723,6 @@ 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 )
|
||||
{
|
||||
|
@ -770,7 +737,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.warmupTime && (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) || noOutfittingChange || client->sess.noTeamChange )
|
||||
if ( (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > 20000) || noOutfittingChange || client->sess.noTeamChange )
|
||||
{
|
||||
ghost = qtrue;
|
||||
}
|
||||
|
@ -901,11 +868,23 @@ 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 )
|
||||
|
@ -926,18 +905,7 @@ void G_StopFollowing( gentity_t *ent )
|
|||
BG_PlayerStateToEntityState( &ent->client->ps, &ent->s, qtrue );
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
ent->client->sess.spectatorClient = -1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1037,16 +1005,6 @@ 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 )
|
||||
{
|
||||
|
@ -1187,11 +1145,6 @@ 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
|
||||
|
@ -1342,7 +1295,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[256];
|
||||
char name[64];
|
||||
|
||||
// Logging stuff
|
||||
switch ( mode )
|
||||
|
@ -1702,7 +1655,6 @@ 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" ) ) {
|
||||
|
@ -1743,12 +1695,6 @@ 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 );
|
||||
}
|
||||
|
@ -1761,13 +1707,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 ), "Randomly Generated Map" );
|
||||
Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "%s", level.voteString );
|
||||
}
|
||||
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 currently set up.\n\"" );
|
||||
trap_SendServerCommand( ent-g_entities, "print \"there is no map cycle ccurently set up.\n\"" );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1790,15 +1736,7 @@ void Cmd_CallVote_f( gentity_t *ent )
|
|||
return;
|
||||
}
|
||||
|
||||
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.voteString, sizeof(level.voteString ), "%s %s", arg1, arg2 );
|
||||
Com_sprintf ( level.voteDisplayString, sizeof(level.voteDisplayString), "kick %s", g_entities[n].client->pers.netname );
|
||||
}
|
||||
else if ( !Q_stricmp ( arg1, "kick" ) )
|
||||
|
@ -1811,15 +1749,7 @@ 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" ) )
|
||||
|
@ -1835,19 +1765,9 @@ 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 );
|
||||
|
@ -1922,39 +1842,6 @@ 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));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -2057,8 +1944,6 @@ 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)
|
||||
|
@ -2085,8 +1970,6 @@ 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,7 +41,11 @@ 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;
|
||||
|
@ -67,7 +71,36 @@ void TossClientItems( gentity_t *self )
|
|||
G_DropWeapon ( self, weapon, 0 );
|
||||
}
|
||||
|
||||
G_DropGametypeItems ( self, 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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -115,23 +148,24 @@ 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",
|
||||
|
@ -143,8 +177,7 @@ char *modNames[] =
|
|||
"MOD_SUICIDE",
|
||||
"MOD_TEAMCHANGE",
|
||||
"MOD_TARGET_LASER",
|
||||
"MOD_TRIGGER_HURT",
|
||||
"MOD_TRIGGER_HURT_NOSUICIDE"
|
||||
"MOD_TRIGGER_HURT"
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -248,12 +281,6 @@ 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 );
|
||||
|
@ -279,14 +306,14 @@ void player_die(
|
|||
|
||||
if ( attacker == self )
|
||||
{
|
||||
if ( mod != MOD_TEAMCHANGE && mod != MOD_TRIGGER_HURT_NOSUICIDE )
|
||||
if ( mod != MOD_TEAMCHANGE )
|
||||
{
|
||||
G_AddScore( attacker, g_suicidePenalty.integer );
|
||||
}
|
||||
}
|
||||
else if ( OnSameTeam ( self, attacker ) )
|
||||
{
|
||||
if ( mod != MOD_TELEFRAG && mod != MOD_TRIGGER_HURT_NOSUICIDE )
|
||||
if ( mod != MOD_TELEFRAG )
|
||||
{
|
||||
G_AddScore( attacker, g_teamkillPenalty.integer );
|
||||
}
|
||||
|
@ -299,7 +326,7 @@ void player_die(
|
|||
attacker->client->lastKillTime = level.time;
|
||||
}
|
||||
}
|
||||
else if ( mod != MOD_TEAMCHANGE && mod != MOD_TRIGGER_HURT_NOSUICIDE )
|
||||
else if ( mod != MOD_TEAMCHANGE )
|
||||
{
|
||||
G_AddScore( self, g_suicidePenalty.integer );
|
||||
}
|
||||
|
@ -334,7 +361,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, level.gametypeItems[item->giTag].id, 0, 0, 0, 0 ) )
|
||||
if ( !trap_GT_SendEvent ( GTEV_ITEM_STUCK, level.time, item->quantity, 0, 0, 0, 0 ) )
|
||||
{
|
||||
G_ResetGametypeItem ( item );
|
||||
}
|
||||
|
@ -379,7 +406,6 @@ 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;
|
||||
|
@ -792,6 +818,13 @@ 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 )
|
||||
{
|
||||
|
@ -886,7 +919,7 @@ int G_Damage (
|
|||
// if the attacker was on the same team
|
||||
if ( targ != attacker && OnSameTeam (targ, attacker) )
|
||||
{
|
||||
if ( !g_friendlyFire.integer || level.warmupTime )
|
||||
if ( !g_friendlyFire.integer )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -918,31 +951,24 @@ int G_Damage (
|
|||
take -= asave;
|
||||
|
||||
// Teamkill dmage thats not caused by a telefrag?
|
||||
if ( g_teamkillDamageMax.integer && mod != MOD_TELEFRAG && !(dflags&DAMAGE_NO_TEAMKILL) )
|
||||
if ( g_teamkillDamageMax.integer && mod != MOD_TELEFRAG )
|
||||
{
|
||||
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 )
|
||||
|
@ -1026,17 +1052,9 @@ 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] *= slowdown;
|
||||
targ->client->ps.velocity[1] *= slowdown;
|
||||
targ->client->ps.velocity[0] *= 0.25f;
|
||||
targ->client->ps.velocity[1] *= 0.25f;
|
||||
|
||||
// figure momentum add, even if the damage won't be taken
|
||||
if ( knockback )
|
||||
|
@ -1045,7 +1063,7 @@ int G_Damage (
|
|||
}
|
||||
|
||||
// Friendly fire
|
||||
if ( !level.warmupTime && g_friendlyFire.integer && targ != attacker && OnSameTeam ( targ, attacker ) )
|
||||
if ( g_friendlyFire.integer && targ != attacker && OnSameTeam ( targ, attacker ) )
|
||||
{
|
||||
vec3_t diff;
|
||||
|
||||
|
@ -1259,7 +1277,6 @@ qboolean G_RadiusDamage (
|
|||
float radius,
|
||||
gentity_t* ignore,
|
||||
int power,
|
||||
int dflags,
|
||||
int mod
|
||||
)
|
||||
{
|
||||
|
@ -1346,16 +1363,10 @@ qboolean G_RadiusDamage (
|
|||
location = G_MultipleDamageLocations ( location );
|
||||
}
|
||||
|
||||
d = G_Damage (ent, NULL, attacker, dir, origin, (int)points, DAMAGE_RADIUS|DAMAGE_NO_ARMOR|dflags, mod, location );
|
||||
d = G_Damage (ent, NULL, attacker, dir, origin, (int)points, DAMAGE_RADIUS|DAMAGE_NO_ARMOR, 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 );
|
||||
|
||||
|
@ -1367,7 +1378,7 @@ qboolean G_RadiusDamage (
|
|||
}
|
||||
else if (points >= 10)
|
||||
{ // dangerous weapon
|
||||
weapon = WP_SMOHG92_GRENADE;
|
||||
weapon = WP_M67_GRENADE;
|
||||
}
|
||||
else
|
||||
{ // Just a flesh wound
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
|
||||
#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;
|
||||
|
||||
|
@ -58,10 +54,6 @@ void SP_gametype_player ( gentity_t *ent )
|
|||
{
|
||||
team = TEAM_BLUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
team = TEAM_FREE;
|
||||
}
|
||||
}
|
||||
|
||||
G_AddClientSpawn ( ent, team );
|
||||
|
@ -76,30 +68,12 @@ 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 )
|
||||
|
@ -128,47 +102,44 @@ void SP_gametype_trigger ( gentity_t* ent )
|
|||
}
|
||||
|
||||
InitTrigger (ent);
|
||||
|
||||
ent->s.eType = ET_GAMETYPE_TRIGGER;
|
||||
}
|
||||
|
||||
static gentity_t* G_RealSpawnGametypeItem ( gitem_t* item, vec3_t origin, vec3_t angles, qboolean dropped )
|
||||
static gentity_t* G_RealSpawnGametypeItem ( gentity_t* ent, qboolean dropped )
|
||||
{
|
||||
gentity_t* it_ent;
|
||||
|
||||
it_ent = G_Spawn();
|
||||
|
||||
it_ent->flags |= FL_DROPPED_ITEM;
|
||||
it_ent->item = item;
|
||||
it_ent->item = ent->item;
|
||||
|
||||
VectorCopy( origin, it_ent->s.origin );
|
||||
VectorCopy ( angles, it_ent->s.apos.trBase );
|
||||
VectorCopy ( angles, it_ent->s.angles );
|
||||
it_ent->classname = item->classname;
|
||||
VectorCopy( ent->r.currentOrigin, it_ent->s.origin );
|
||||
VectorCopy ( ent->s.angles, it_ent->s.apos.trBase );
|
||||
it_ent->classname = ent->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, vec3_t origin )
|
||||
gentity_t* G_SpawnGametypeItem ( const char* pickup_name, qboolean dropped )
|
||||
{
|
||||
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" ) ) )
|
||||
|
@ -187,12 +158,12 @@ gentity_t* G_SpawnGametypeItem ( const char* pickup_name, qboolean dropped, vec3
|
|||
return NULL;
|
||||
}
|
||||
|
||||
return G_RealSpawnGametypeItem ( ent->item, ent->r.currentOrigin, ent->s.angles, dropped );
|
||||
return G_RealSpawnGametypeItem ( ent, dropped );
|
||||
}
|
||||
|
||||
void G_GametypeItemThink ( gentity_t* ent )
|
||||
{
|
||||
G_RealSpawnGametypeItem ( ent->item, ent->r.currentOrigin, ent->s.angles, qfalse );
|
||||
G_RealSpawnGametypeItem ( ent, qfalse );
|
||||
}
|
||||
|
||||
/*QUAKED gametype_item (0 0 1) (-16 -16 -16) (16 16 16)
|
||||
|
@ -253,7 +224,7 @@ void G_ResetGametypeItem ( gitem_t* item )
|
|||
continue;
|
||||
}
|
||||
|
||||
G_RealSpawnGametypeItem ( find->item, find->r.currentOrigin, find->s.angles, qfalse );
|
||||
G_RealSpawnGametypeItem ( find, qfalse );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -285,7 +256,7 @@ void G_ResetGametypeEntities ( void )
|
|||
G_RespawnClients
|
||||
===============
|
||||
*/
|
||||
void G_RespawnClients ( qboolean force, team_t team, qboolean fullRestart )
|
||||
void G_RespawnClients ( qboolean force, team_t team )
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -339,16 +310,6 @@ void G_RespawnClients ( qboolean force, team_t team, qboolean fullRestart )
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -386,18 +347,6 @@ 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 )
|
||||
{
|
||||
|
@ -412,18 +361,6 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -432,7 +369,7 @@ void G_ResetEntities ( void )
|
|||
G_ResetGametype
|
||||
===============
|
||||
*/
|
||||
void G_ResetGametype ( qboolean fullRestart )
|
||||
void G_ResetGametype ( void )
|
||||
{
|
||||
gentity_t* tent;
|
||||
|
||||
|
@ -445,13 +382,6 @@ void G_ResetGametype ( qboolean fullRestart )
|
|||
// 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 )
|
||||
{
|
||||
|
@ -463,7 +393,7 @@ void G_ResetGametype ( qboolean fullRestart )
|
|||
|
||||
case RT_NONE:
|
||||
level.gametypeDelayTime = level.time + g_roundstartdelay.integer * 1000;
|
||||
level.gametypeRoundTime = level.time + (g_roundtimelimit.integer * 60000) + g_roundstartdelay.integer * 1000;
|
||||
level.gametypeRoundTime = level.time + (g_roundtimelimit.integer * 60000);
|
||||
|
||||
if ( level.gametypeDelayTime != level.time )
|
||||
{
|
||||
|
@ -483,21 +413,12 @@ void G_ResetGametype ( qboolean fullRestart )
|
|||
}
|
||||
|
||||
// Respawn all clients
|
||||
G_RespawnClients ( qtrue, TEAM_RED, fullRestart );
|
||||
G_RespawnClients ( qtrue, TEAM_BLUE, fullRestart );
|
||||
G_RespawnClients ( qtrue, TEAM_RED );
|
||||
G_RespawnClients ( qtrue, TEAM_BLUE );
|
||||
|
||||
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;
|
||||
|
@ -622,71 +543,6 @@ 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
|
||||
|
@ -704,9 +560,10 @@ void CheckGametype ( void )
|
|||
// the first person joins
|
||||
if ( !level.gametypeStartTime )
|
||||
{
|
||||
int counts[TEAM_NUM_TEAMS];
|
||||
int i;
|
||||
|
||||
memset ( level.teamAliveCount, 0, sizeof(level.teamAliveCount) );
|
||||
memset ( counts, 0, sizeof(counts) );
|
||||
|
||||
for ( i = 0; i < level.numConnectedClients; i ++ )
|
||||
{
|
||||
|
@ -722,12 +579,12 @@ void CheckGametype ( void )
|
|||
continue;
|
||||
}
|
||||
|
||||
level.teamAliveCount[other->client->sess.team]++;
|
||||
counts[other->client->sess.team]++;
|
||||
}
|
||||
|
||||
if ( level.teamAliveCount[TEAM_RED] || level.teamAliveCount[TEAM_BLUE] || level.teamAliveCount[TEAM_FREE] )
|
||||
if ( counts[TEAM_RED] || counts[TEAM_BLUE] )
|
||||
{
|
||||
G_ResetGametype ( qfalse );
|
||||
G_ResetGametype ( );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -740,7 +597,7 @@ void CheckGametype ( void )
|
|||
// Dont do this again
|
||||
level.gametypeResetTime = 0;
|
||||
|
||||
G_ResetGametype ( qfalse );
|
||||
G_ResetGametype ( );
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -755,7 +612,7 @@ void CheckGametype ( void )
|
|||
if ( level.gametypeRespawnTime[team] && level.time > level.gametypeRespawnTime[team] )
|
||||
{
|
||||
// Respawn all dead clients
|
||||
G_RespawnClients ( qfalse, team, qfalse );
|
||||
G_RespawnClients ( qfalse, team );
|
||||
|
||||
// Next interval
|
||||
level.gametypeRespawnTime[team] = 0;
|
||||
|
@ -764,12 +621,13 @@ void CheckGametype ( void )
|
|||
}
|
||||
|
||||
// If we are in RT_NONE respawn mode then we need to look for everyone being dead
|
||||
if ( level.gametypeData->respawnType == RT_NONE && level.gametypeStartTime )
|
||||
if ( level.time > level.gametypeDelayTime && level.gametypeData->respawnType == RT_NONE && level.gametypeStartTime )
|
||||
{
|
||||
int i;
|
||||
int alive[TEAM_NUM_TEAMS];
|
||||
int dead[TEAM_NUM_TEAMS];
|
||||
|
||||
memset ( &level.teamAliveCount[0], 0, sizeof(level.teamAliveCount) );
|
||||
memset ( &alive[0], 0, sizeof(alive) );
|
||||
memset ( &dead[0], 0, sizeof(dead) );
|
||||
for ( i = 0; i < level.numConnectedClients; i ++ )
|
||||
{
|
||||
|
@ -786,19 +644,17 @@ void CheckGametype ( void )
|
|||
}
|
||||
else
|
||||
{
|
||||
level.teamAliveCount[ent->client->sess.team] ++;
|
||||
alive[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 ( !level.teamAliveCount[TEAM_RED] && dead[TEAM_RED] )
|
||||
if ( !alive[TEAM_RED] && dead[TEAM_RED] )
|
||||
{
|
||||
trap_GT_SendEvent ( GTEV_TEAM_ELIMINATED, level.time, TEAM_RED, 0, 0, 0, 0 );
|
||||
}
|
||||
else if ( !level.teamAliveCount[TEAM_BLUE] && dead[TEAM_BLUE] )
|
||||
else if ( !alive[TEAM_BLUE] && dead[TEAM_BLUE] )
|
||||
{
|
||||
trap_GT_SendEvent ( GTEV_TEAM_ELIMINATED, level.time, TEAM_BLUE, 0, 0, 0, 0 );
|
||||
}
|
||||
|
@ -810,7 +666,6 @@ void CheckGametype ( void )
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -826,7 +681,7 @@ int G_GametypeCommand ( int cmd, int arg0, int arg1, int arg2, int arg3, int arg
|
|||
case GTCMD_RESTART:
|
||||
if ( arg0 <= 0 )
|
||||
{
|
||||
G_ResetGametype ( qfalse );
|
||||
G_ResetGametype ( );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -842,7 +697,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_REGISTERSOUND:
|
||||
case GTCMD_REGISTERGLOBALSOUND:
|
||||
return G_SoundIndex ( (char*) arg0 );
|
||||
|
||||
case GTCMD_STARTGLOBALSOUND:
|
||||
|
@ -854,20 +709,9 @@ 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;
|
||||
|
@ -897,95 +741,6 @@ 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;
|
||||
|
@ -1008,28 +763,11 @@ 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;
|
||||
}
|
||||
|
||||
|
@ -1039,9 +777,6 @@ 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" ) ) )
|
||||
|
@ -1054,26 +789,12 @@ 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,7 +298,6 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace)
|
|||
int respawn;
|
||||
qboolean predict;
|
||||
qboolean autoswitch;
|
||||
int eventID;
|
||||
|
||||
if (!other->client)
|
||||
return;
|
||||
|
@ -317,7 +316,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, level.gametypeItems[ent->item->giTag].id, other->s.number, other->client->sess.team, 0, 0 ) )
|
||||
if ( !trap_GT_SendEvent ( GTEV_ITEM_TOUCHED, level.time, ent->item->quantity, other->s.number, other->client->sess.team, 0, 0 ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -363,25 +362,19 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace)
|
|||
return;
|
||||
}
|
||||
|
||||
if ( !respawn && !(ent->flags & FL_DROPPED_ITEM) )
|
||||
if ( !respawn )
|
||||
{
|
||||
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, eventID, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) );
|
||||
G_AddPredictableEvent( other, EV_ITEM_PICKUP, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) );
|
||||
}
|
||||
else
|
||||
{
|
||||
G_AddEvent( other, eventID, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) );
|
||||
G_AddEvent( other, EV_ITEM_PICKUP, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) );
|
||||
}
|
||||
|
||||
// fire item targets
|
||||
|
@ -461,7 +454,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, origin );
|
||||
dropped = G_SpawnGametypeItem ( item->pickup_name, qtrue );
|
||||
dropped->nextthink = 0;
|
||||
}
|
||||
else
|
||||
|
@ -520,14 +513,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, 100, velocity );
|
||||
velocity[2] += 100 + crandom() * 50;
|
||||
VectorScale( velocity, 150, velocity );
|
||||
velocity[2] += 200 + crandom() * 50;
|
||||
|
||||
dropped = LaunchItem( item, ent->r.currentOrigin, velocity );
|
||||
|
||||
if ( item->giType == IT_GAMETYPE )
|
||||
{
|
||||
trap_GT_SendEvent ( GTEV_ITEM_DROPPED, level.time, level.gametypeItems[item->giTag].id, ent->s.number, 0, 0, 0 );
|
||||
trap_GT_SendEvent ( GTEV_ITEM_DROPPED, level.time, item->quantity, ent->s.number, 0, 0, 0 );
|
||||
}
|
||||
|
||||
return dropped;
|
||||
|
@ -617,12 +610,6 @@ 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;
|
||||
|
||||
|
@ -747,7 +734,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 );
|
||||
|
@ -778,12 +765,6 @@ void FinishSpawningItem( gentity_t *ent )
|
|||
return;
|
||||
}
|
||||
|
||||
// Gametype items are broadcast
|
||||
if ( ent->item->giType == IT_GAMETYPE )
|
||||
{
|
||||
ent->r.svFlags |= SVF_BROADCAST;
|
||||
}
|
||||
|
||||
trap_LinkEntity (ent);
|
||||
}
|
||||
|
||||
|
@ -860,28 +841,11 @@ void SaveRegisteredItems( void )
|
|||
G_ItemDisabled
|
||||
============
|
||||
*/
|
||||
qboolean G_ItemDisabled( gitem_t *item )
|
||||
int G_ItemDisabled( gitem_t *item )
|
||||
{
|
||||
char name[128];
|
||||
int val;
|
||||
Com_sprintf(name, sizeof(name), "disable_%s", item->classname);
|
||||
|
||||
val = trap_Cvar_VariableIntegerValue( name );
|
||||
|
||||
if ( !val )
|
||||
{
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
if ( val == 2 )
|
||||
{
|
||||
if ( !level.gametypeData->pickupsDisabled )
|
||||
{
|
||||
return qfalse;
|
||||
}
|
||||
}
|
||||
|
||||
return qtrue;
|
||||
return trap_Cvar_VariableIntegerValue( name );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -918,7 +882,7 @@ void G_SpawnItem (gentity_t *ent, gitem_t *item)
|
|||
ent->nextthink = level.time + FRAMETIME * 2;
|
||||
ent->think = FinishSpawningItem;
|
||||
|
||||
ent->physicsBounce = 0.2f; // items are bouncy
|
||||
ent->physicsBounce = 0.50; // items are bouncy
|
||||
}
|
||||
|
||||
|
||||
|
@ -1028,7 +992,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, level.gametypeItems[ent->item->giTag].id, 0, 0, 0, 0 ) )
|
||||
if ( !trap_GT_SendEvent ( GTEV_ITEM_STUCK, level.time, ent->item->quantity, 0, 0, 0, 0 ) )
|
||||
{
|
||||
G_ResetGametypeItem ( ent->item );
|
||||
}
|
||||
|
|
|
@ -166,15 +166,6 @@ typedef struct gspawn_s
|
|||
|
||||
} gspawn_t;
|
||||
|
||||
typedef struct gtitem_s
|
||||
{
|
||||
int id;
|
||||
int useIcon;
|
||||
int useSound;
|
||||
int useTime;
|
||||
|
||||
} gtitem_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CON_DISCONNECTED,
|
||||
|
@ -188,7 +179,6 @@ typedef enum
|
|||
SPECTATOR_NOT,
|
||||
SPECTATOR_FREE,
|
||||
SPECTATOR_FOLLOW,
|
||||
SPECTATOR_FOLLOWFIRST,
|
||||
SPECTATOR_SCOREBOARD
|
||||
|
||||
} spectatorState_t;
|
||||
|
@ -234,7 +224,6 @@ 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
|
||||
|
@ -243,8 +232,6 @@ 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;
|
||||
|
||||
|
@ -382,10 +369,6 @@ struct gclient_s
|
|||
vec3_t ghoulHeadAngles;
|
||||
|
||||
gentity_t *siameseTwin;
|
||||
gentity_t *useEntity;
|
||||
|
||||
vec3_t maxSave;
|
||||
vec3_t minSave;
|
||||
};
|
||||
|
||||
|
||||
|
@ -395,8 +378,6 @@ 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]
|
||||
|
@ -428,7 +409,6 @@ 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
|
||||
|
@ -503,7 +483,6 @@ 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];
|
||||
|
@ -517,11 +496,6 @@ typedef struct
|
|||
|
||||
int timeExtension;
|
||||
|
||||
int autokickedCount;
|
||||
int autokickedHead;
|
||||
char autokickedName[MAX_AUTOKICKLIST][MAX_NETNAME];
|
||||
char autokickedIP[MAX_AUTOKICKLIST][20];
|
||||
|
||||
} level_locals_t;
|
||||
|
||||
//
|
||||
|
@ -568,7 +542,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* LaunchItem ( gitem_t *item, vec3_t origin, vec3_t velocity );
|
||||
gentity_t* G_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);
|
||||
|
@ -607,12 +581,10 @@ 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);
|
||||
|
@ -647,7 +619,6 @@ 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);
|
||||
|
@ -676,7 +647,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 dflags, int mod );
|
||||
qboolean G_RadiusDamage ( vec3_t origin, gentity_t *attacker, float damage, float radius, gentity_t *ignore, int power, 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 );
|
||||
|
||||
|
@ -690,7 +661,6 @@ 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
|
||||
|
@ -753,13 +723,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
|
||||
|
@ -835,22 +805,19 @@ 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, vec3_t origin );
|
||||
gentity_t* G_SpawnGametypeItem ( const char* pickup_name, qboolean dropped );
|
||||
gentity_t* G_SelectRandomGametypeSpawnPoint ( team_t team );
|
||||
qboolean G_ParseGametypeFile ( void );
|
||||
qboolean G_ExecuteGametypeScript ( gentity_t* activator, const char* name );
|
||||
void G_ResetGametype ( qboolean fullRestart );
|
||||
void G_ResetGametype ( void );
|
||||
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
|
||||
|
@ -910,10 +877,11 @@ 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;
|
||||
|
@ -924,7 +892,6 @@ 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;
|
||||
|
@ -936,13 +903,8 @@ 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,10 +52,11 @@ 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;
|
||||
|
@ -65,7 +66,6 @@ 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,13 +78,8 @@ 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;
|
||||
|
@ -127,6 +122,9 @@ 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 },
|
||||
|
@ -145,7 +143,6 @@ 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 },
|
||||
|
||||
|
@ -163,33 +160,11 @@ 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", "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_availableWeapons, "g_availableWeapons", "2222222222211", CVAR_ARCHIVE|CVAR_SERVERINFO|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 },
|
||||
|
@ -206,13 +181,6 @@ 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
|
||||
|
@ -442,47 +410,6 @@ 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
|
||||
|
@ -522,7 +449,6 @@ 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 );
|
||||
|
@ -568,6 +494,7 @@ void G_InitGame( int levelTime, int randomSeed, int restart )
|
|||
|
||||
G_RegisterCvars();
|
||||
|
||||
G_ProcessIPBans();
|
||||
|
||||
// Load the list of arenas
|
||||
G_LoadArenas ( );
|
||||
|
@ -578,12 +505,6 @@ 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 ) );
|
||||
|
||||
|
@ -652,6 +573,8 @@ 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
|
||||
|
@ -662,8 +585,6 @@ void G_InitGame( int levelTime, int randomSeed, int restart )
|
|||
// linked up properly
|
||||
G_ParseGametypeFile ( );
|
||||
|
||||
BG_ParseInviewFile( level.pickupsDisabled );
|
||||
|
||||
// Load in the identities
|
||||
BG_ParseNPCFiles ( );
|
||||
|
||||
|
@ -691,6 +612,9 @@ 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 );
|
||||
|
||||
|
@ -1019,12 +943,8 @@ 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);
|
||||
|
||||
|
@ -1202,7 +1122,7 @@ void QDECL G_LogPrintf( const char *fmt, ... ) {
|
|||
tens = sec / 10;
|
||||
sec -= tens * 10;
|
||||
|
||||
Com_sprintf( string, sizeof(string), "%4i:%i%i ", min, tens, sec );
|
||||
Com_sprintf( string, sizeof(string), "%fi:%i%i ", min, tens, sec );
|
||||
|
||||
va_start( argptr, fmt );
|
||||
vsprintf( string +8 , fmt,argptr );
|
||||
|
@ -1422,7 +1342,7 @@ void CheckExitRules( void )
|
|||
}
|
||||
|
||||
// check for sudden death
|
||||
if ( g_suddenDeath.integer && ScoreIsTied() )
|
||||
if ( ScoreIsTied() )
|
||||
{
|
||||
// always wait for sudden death
|
||||
return;
|
||||
|
@ -1430,8 +1350,6 @@ 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 )
|
||||
{
|
||||
|
@ -1444,7 +1362,6 @@ void CheckExitRules( void )
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check to see if the score was hit
|
||||
if ( g_scorelimit.integer )
|
||||
|
@ -1581,12 +1498,10 @@ 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" );
|
||||
|
||||
G_ResetGametype ( qtrue );
|
||||
// trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" );
|
||||
// level.restarted = qtrue;
|
||||
level.warmupTime += 10000;
|
||||
trap_Cvar_Set( "g_restarted", "1" );
|
||||
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.06f,ent->splashRadius, 8000,ent->methodOfDeath );
|
||||
G_CreateDamageArea ( ent->r.currentOrigin, ent->parent, ent->splashDamage*0.05f,ent->splashRadius, 8000,ent->methodOfDeath );
|
||||
|
||||
// do some instant damage
|
||||
G_RadiusDamage( ent->r.currentOrigin, ent->parent, ent->damage, ent->splashRadius, ent,
|
||||
1, ent->dflags, ent->splashMethodOfDeath );
|
||||
1, ent->splashMethodOfDeath );
|
||||
}
|
||||
else
|
||||
{ // normal radius of effect damage
|
||||
G_RadiusDamage( ent->r.currentOrigin, ent->parent, ent->splashDamage, ent->splashRadius, ent,
|
||||
1, ent->dflags, ent->splashMethodOfDeath );
|
||||
1, 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, DAMAGE_NO_TEAMKILL, ent->methodOfDeath );
|
||||
G_RadiusDamage ( ent->r.currentOrigin, ent->parent, ent->splashDamage, ent->splashRadius, ent, 3, 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.06f,ent->splashRadius*2, 8000,ent->methodOfDeath );
|
||||
G_CreateDamageArea ( trace->endpos, ent->parent, ent->splashDamage*0.10f,ent->splashRadius*2, 8000,ent->methodOfDeath );
|
||||
|
||||
// do some instant damage
|
||||
G_RadiusDamage( trace->endpos, ent->parent, ent->damage, ent->splashRadius, other,
|
||||
1, ent->dflags, ent->splashMethodOfDeath );
|
||||
1, ent->splashMethodOfDeath );
|
||||
}
|
||||
else
|
||||
{ // normal radius of effect damage
|
||||
G_RadiusDamage( trace->endpos, ent->parent, ent->splashDamage, ent->splashRadius,
|
||||
other, 1, ent->dflags, ent->splashMethodOfDeath );
|
||||
other, 1, ent->splashMethodOfDeath );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -554,15 +554,23 @@ void G_RunMissile( gentity_t *ent )
|
|||
if ( tr.fraction != 1 )
|
||||
{
|
||||
// Hit the sky or moving through something
|
||||
if ( (tr.surfaceFlags & SURF_NOIMPACT) && (tr.surfaceFlags & SURF_SKY) )
|
||||
if ( tr.surfaceFlags & SURF_NOIMPACT )
|
||||
{
|
||||
// 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,13 +326,12 @@ 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 && check->item->giType != IT_GAMETYPE )
|
||||
if ( check->s.eType == ET_ITEM )
|
||||
{
|
||||
G_FreeEntity ( check );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// the move was blocked an entity
|
||||
|
||||
// bobbing entities are instant-kill and never get blocked
|
||||
|
@ -1408,47 +1407,6 @@ 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,10 +24,7 @@
|
|||
|
||||
#define SVF_GLASS_BRUSH 0x08000000 // Ent is a glass brush
|
||||
|
||||
#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)
|
||||
#define SVF_DOUBLED_BBOX 0x00001000 // Bounding box has been doubled
|
||||
|
||||
//===============================================================
|
||||
|
||||
|
@ -66,8 +63,6 @@ typedef struct {
|
|||
// by the second array index.
|
||||
int broadcastClients[2];
|
||||
|
||||
int detailTime;
|
||||
|
||||
} entityShared_t;
|
||||
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ void G_InitSessionData( gclient_t *client, char *userinfo )
|
|||
if ( g_teamAutoJoin.integer )
|
||||
{
|
||||
sess->team = PickTeam( -1 );
|
||||
BroadcastTeamChange( client, -1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -131,7 +131,6 @@ 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);
|
||||
|
@ -193,7 +192,6 @@ 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.
|
||||
|
@ -254,6 +252,7 @@ spawn_t spawns[] =
|
|||
{"info_null", 0},
|
||||
{"door_rotating", 0},
|
||||
{"emplaced_wpn", 0},
|
||||
{"func_wall", 0},
|
||||
{"info_NPC*", 0},
|
||||
{"info_player_start", 0},
|
||||
{"NPC_*", 0},
|
||||
|
@ -261,7 +260,6 @@ spawn_t spawns[] =
|
|||
{"pickup_ammo", 0},
|
||||
{"script_runner", 0},
|
||||
{"trigger_arioche_objective", 0},
|
||||
{"func_brushmodel_child", 0},
|
||||
|
||||
{0, 0}
|
||||
};
|
||||
|
@ -434,35 +432,6 @@ 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
|
||||
|
@ -517,25 +486,15 @@ void G_SpawnGEntityFromSpawnVars( qboolean inSubBSP )
|
|||
}
|
||||
|
||||
// Only spawn this entity in the specified gametype
|
||||
if( G_SpawnString( "gametype", NULL, &value ) && value )
|
||||
if( G_SpawnString( "gametype", NULL, &value ) )
|
||||
{
|
||||
if ( !G_IsGametypeInList ( level.gametypeData->name, value ) )
|
||||
{
|
||||
if ( level.gametypeData->basegametype )
|
||||
{
|
||||
if ( !G_IsGametypeInList ( level.gametypeData->basegametype, value ) )
|
||||
// Has to be a case match
|
||||
if ( value && !strstr ( value, level.gametypeData->name ) )
|
||||
{
|
||||
G_FreeEntity ( ent );
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
G_FreeEntity ( ent );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// move editor origin to pos
|
||||
VectorCopy( ent->s.origin, ent->s.pos.trBase );
|
||||
|
@ -1018,7 +977,7 @@ void SP_worldspawn( void )
|
|||
|
||||
trap_SetConfigstring( CS_MOTD, g_motd.string ); // message of the day
|
||||
|
||||
G_SpawnString( "gravity", va("%d", g_gravity.integer), &text );
|
||||
G_SpawnString( "gravity", "800", &text );
|
||||
trap_Cvar_Set( "g_gravity", text );
|
||||
|
||||
// Handle all the worldspawn stuff common to both main bsp and sub bsp
|
||||
|
|
|
@ -5,8 +5,274 @@
|
|||
|
||||
#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
|
||||
|
@ -93,54 +359,6 @@ 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;
|
||||
|
@ -264,10 +482,27 @@ 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 )
|
||||
{
|
||||
trap_Argv( 1, cmd, sizeof( cmd ) );
|
||||
G_ResetGametype ( Q_stricmp ( cmd, "full" ) == 0 );
|
||||
G_ResetGametype ( );
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
|
@ -277,18 +512,6 @@ 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,8 +194,6 @@ 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,16 +825,6 @@ 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, qboolean pvs )
|
||||
gentity_t *Team_GetLocation(gentity_t *ent)
|
||||
{
|
||||
gentity_t *eloc, *best;
|
||||
float bestlen, len;
|
||||
|
@ -173,7 +173,7 @@ gentity_t *Team_GetLocation(gentity_t *ent, qboolean pvs )
|
|||
continue;
|
||||
}
|
||||
|
||||
if ( pvs && !trap_InPVS( origin, eloc->r.currentOrigin ) )
|
||||
if ( !trap_InPVS( origin, eloc->r.currentOrigin ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -195,11 +195,7 @@ qboolean Team_GetLocationMsg ( gentity_t *ent, char *loc, int loclen )
|
|||
{
|
||||
gentity_t *best;
|
||||
|
||||
best = Team_GetLocation( ent, qtrue );
|
||||
if ( !best )
|
||||
{
|
||||
best = Team_GetLocation( ent, qfalse );
|
||||
}
|
||||
best = Team_GetLocation( ent );
|
||||
|
||||
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, qboolean pvs );
|
||||
gentity_t* Team_GetLocation ( gentity_t *ent );
|
||||
qboolean Team_GetLocationMsg ( gentity_t *ent, char *loc, int loclen );
|
||||
|
||||
|
||||
|
|
|
@ -329,14 +329,9 @@ 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 );
|
||||
}
|
||||
}
|
||||
|
@ -369,7 +364,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, self->methodOfDeath, HL_NONE );
|
||||
G_Damage (other, self, self, NULL, NULL, self->damage, dflags, MOD_TRIGGER_HURT, HL_NONE );
|
||||
}
|
||||
|
||||
void SP_trigger_hurt( gentity_t *self ) {
|
||||
|
@ -382,13 +377,14 @@ 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);
|
||||
}
|
||||
}
|
||||
|
@ -402,7 +398,6 @@ 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 && !other->inuse )
|
||||
if ( !other->inuse )
|
||||
{
|
||||
Com_Printf("entity was removed while using targets\n");
|
||||
return;
|
||||
|
@ -518,33 +518,6 @@ 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
|
||||
|
@ -689,16 +662,6 @@ 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
|
||||
|
@ -722,7 +685,6 @@ 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,8 +210,6 @@ 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;
|
||||
|
@ -241,14 +239,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_JUMPING )
|
||||
{
|
||||
inaccuracy *= JUMP_ACCURACY_MODIFIER;
|
||||
}
|
||||
else if ( ent->client->ps.pm_flags & PMF_DUCKED )
|
||||
if ( ent->client->ps.pm_flags & PMF_DUCKED )
|
||||
{
|
||||
inaccuracy *= DUCK_ACCURACY_MODIFIER;
|
||||
}
|
||||
else if ( ent->client->ps.pm_flags & PMF_JUMPING )
|
||||
{
|
||||
inaccuracy *= JUMP_ACCURACY_MODIFIER;
|
||||
}
|
||||
}
|
||||
|
||||
// Anti-lag
|
||||
|
@ -260,14 +258,18 @@ 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 )
|
||||
{
|
||||
BG_ApplyLeanOffset ( &ent->client->ps, muzzlePoint );
|
||||
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 );
|
||||
}
|
||||
|
||||
AngleVectors( fireAngs, fwd, NULL, NULL );
|
||||
|
||||
// Move the start trace back a bit to account for bumping up against someone
|
||||
VectorMA ( muzzlePoint, -15, fwd, muzzlePoint );
|
||||
|
||||
|
@ -484,7 +486,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 || level.warmupTime) ) ) )
|
||||
if ( !level.gametypeData->teams || (ent->client && !(OnSameTeam(ent,traceEnt) && !g_friendlyFire.integer ) ) )
|
||||
{
|
||||
flesh = qtrue;
|
||||
}
|
||||
|
@ -524,8 +526,6 @@ 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,6 +549,12 @@ 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 );
|
||||
}
|
||||
}
|
||||
|
@ -582,7 +588,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_M84_GRENADE && weapon < WP_M15_GRENADE && (flags&PROJECTILE_TIMED) && (ent->client->ps.pm_type == PM_NORMAL) )
|
||||
if ( weapon >= WP_M67_GRENADE && weapon < WP_M15_GRENADE && (flags&PROJECTILE_TIMED) && (ent->client->ps.pm_type == PM_NORMAL) )
|
||||
{
|
||||
gentity_t* nearby;
|
||||
|
||||
|
@ -601,7 +607,12 @@ gentity_t* G_FireProjectile ( gentity_t *ent, weapon_t weapon, attackType_t atta
|
|||
|
||||
if ( ent->client->ps.pm_flags & PMF_LEANING )
|
||||
{
|
||||
BG_ApplyLeanOffset ( &ent->client->ps, muzzlePoint );
|
||||
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 );
|
||||
}
|
||||
|
||||
AngleVectors( fireAngs, fwd, right, up );
|
||||
|
|
|
@ -54,44 +54,45 @@ typedef enum
|
|||
MODELINDEX_WEAPON_KNIFE, // 6
|
||||
MODELINDEX_WEAPON_SOCOM,
|
||||
MODELINDEX_WEAPON_M19,
|
||||
MODELINDEX_WEAPON_SILVERTALON,
|
||||
MODELINDEX_WEAPON_MICROUZI,
|
||||
MODELINDEX_WEAPON_M3A1,
|
||||
|
||||
MODELINDEX_WEAPON_M3A1, // 11
|
||||
MODELINDEX_WEAPON_MP5,
|
||||
MODELINDEX_WEAPON_USAS12,
|
||||
MODELINDEX_WEAPON_USAS12, // 11
|
||||
MODELINDEX_WEAPON_M590,
|
||||
MODELINDEX_WEAPON_MSG90A1,
|
||||
|
||||
MODELINDEX_WEAPON_M4, // 16
|
||||
MODELINDEX_WEAPON_M4,
|
||||
MODELINDEX_WEAPON_AK74,
|
||||
MODELINDEX_WEAPON_SIG551,
|
||||
MODELINDEX_WEAPON_M60,
|
||||
MODELINDEX_WEAPON_RPG7,
|
||||
|
||||
MODELINDEX_WEAPON_MM1, // 21
|
||||
MODELINDEX_WEAPON_M60, // 16
|
||||
MODELINDEX_WEAPON_RPG7,
|
||||
MODELINDEX_WEAPON_MM1,
|
||||
MODELINDEX_WEAPON_M67,
|
||||
MODELINDEX_WEAPON_M84,
|
||||
|
||||
MODELINDEX_WEAPON_F1, // 21
|
||||
MODELINDEX_WEAPON_L2A2,
|
||||
MODELINDEX_WEAPON_MDN11,
|
||||
MODELINDEX_WEAPON_SMOHG92,
|
||||
MODELINDEX_WEAPON_ANM14,
|
||||
MODELINDEX_WEAPON_M15,
|
||||
|
||||
MODELINDEX_AMMO_045, // 26
|
||||
MODELINDEX_WEAPON_M15, // 26
|
||||
MODELINDEX_AMMO_045,
|
||||
MODELINDEX_AMMO_9MM,
|
||||
MODELINDEX_AMMO_12GAUGE,
|
||||
MODELINDEX_AMMO_762,
|
||||
MODELINDEX_AMMO_556,
|
||||
|
||||
MODELINDEX_AMMO_40MM, // 31
|
||||
MODELINDEX_AMMO_556, // 31
|
||||
MODELINDEX_AMMO_40MM,
|
||||
MODELINDEX_AMMO_RPG7,
|
||||
MODELINDEX_BACKPACK,
|
||||
|
||||
MODELINDEX_GAMETYPE_ITEM, // 34
|
||||
MODELINDEX_GAMETYPE_ITEM,
|
||||
MODELINDEX_GAMETYPE_ITEM_2,
|
||||
MODELINDEX_GAMETYPE_ITEM_3,
|
||||
MODELINDEX_GAMETYPE_ITEM_4,
|
||||
MODELINDEX_GAMETYPE_ITEM_5,
|
||||
|
||||
MODELINDEX_ARMOR, // 39
|
||||
MODELINDEX_ARMOR,
|
||||
MODELINDEX_NIGHTVISION,
|
||||
MODELINDEX_THERMAL,
|
||||
|
||||
|
|
|
@ -877,17 +877,11 @@ int Q_PrintStrlen( const char *string ) {
|
|||
|
||||
len = 0;
|
||||
p = string;
|
||||
while( *p )
|
||||
{
|
||||
if( *p == '^' )
|
||||
{
|
||||
p++;
|
||||
if ( *p != '^' )
|
||||
{
|
||||
p ++;
|
||||
while( *p ) {
|
||||
if( Q_IsColorString( p ) ) {
|
||||
p += 2;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
p++;
|
||||
len++;
|
||||
}
|
||||
|
@ -904,18 +898,10 @@ char *Q_CleanStr( char *string ) {
|
|||
s = string;
|
||||
d = string;
|
||||
while ((c = *s) != 0 ) {
|
||||
|
||||
if( *s == '^' )
|
||||
{
|
||||
if ( Q_IsColorString( s ) ) {
|
||||
s++;
|
||||
if( *s == '^' )
|
||||
{
|
||||
*d++ = '^';
|
||||
*d++ = '^';
|
||||
}
|
||||
}
|
||||
else if ( c >= 0x20 && c <= 0x7E )
|
||||
{
|
||||
else if ( c >= 0x20 && c <= 0x7E ) {
|
||||
*d++ = c;
|
||||
}
|
||||
s++;
|
||||
|
|
|
@ -30,25 +30,12 @@
|
|||
//#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 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
|
||||
#define Q3_VERSION "SOF2MP V1.00g"
|
||||
#define SOF2_VERSION_ID "1.00g"
|
||||
#else
|
||||
// #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
|
||||
|
||||
#define Q3_VERSION "SOF2MP V1.00"
|
||||
#define SOF2_VERSION_ID "1.00"
|
||||
#endif
|
||||
|
||||
//#define SPECIAL_PRE_CACHE 1
|
||||
|
@ -1353,7 +1340,6 @@ 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,7 +17,6 @@ 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
|
||||
|
||||
|
@ -27,38 +26,8 @@ CPP=cl.exe
|
|||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "gt_ctf - Win32 Debug"
|
||||
!IF "$(CFG)" == "gt_ctf - Win32 Debug SoF2"
|
||||
|
||||
# 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"
|
||||
|
@ -82,7 +51,6 @@ LINK32=link.exe
|
|||
|
||||
# Begin Target
|
||||
|
||||
# Name "gt_ctf - Win32 Debug"
|
||||
# Name "gt_ctf - Win32 Debug SoF2"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
|
|
|
@ -20,13 +20,6 @@ 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,9 +36,10 @@ 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
|
||||
|
@ -56,8 +57,6 @@ 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:
|
||||
|
@ -78,9 +77,10 @@ GT_RegisterCvars
|
|||
*/
|
||||
void GT_RegisterCvars( void )
|
||||
{
|
||||
int i;
|
||||
cvarTable_t *cv;
|
||||
|
||||
for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ )
|
||||
for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ )
|
||||
{
|
||||
trap_Cvar_Register( cv->vmCvar, cv->cvarName, cv->defaultString, cv->cvarFlags, cv->mMinValue, cv->mMaxValue );
|
||||
|
||||
|
@ -98,9 +98,10 @@ GT_UpdateCvars
|
|||
*/
|
||||
void GT_UpdateCvars( void )
|
||||
{
|
||||
int i;
|
||||
cvarTable_t *cv;
|
||||
|
||||
for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ )
|
||||
for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ )
|
||||
{
|
||||
if ( cv->vmCvar )
|
||||
{
|
||||
|
@ -130,18 +131,9 @@ void GT_Init ( void )
|
|||
memset ( &gametype, 0, sizeof(gametype) );
|
||||
|
||||
// Register the global sounds
|
||||
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" );
|
||||
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" );
|
||||
|
||||
// Register all cvars for this gametype
|
||||
GT_RegisterCvars ( );
|
||||
|
@ -173,7 +165,6 @@ 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;
|
||||
}
|
||||
|
@ -183,7 +174,6 @@ 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;
|
||||
}
|
||||
|
@ -217,7 +207,6 @@ 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:
|
||||
|
@ -225,7 +214,6 @@ 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;
|
||||
}
|
||||
|
||||
|
@ -241,13 +229,11 @@ 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;
|
||||
}
|
||||
|
@ -266,7 +252,6 @@ 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;
|
||||
|
@ -281,7 +266,6 @@ 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;
|
||||
|
@ -303,7 +287,6 @@ 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 )
|
||||
{
|
||||
|
@ -323,7 +306,6 @@ 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 )
|
||||
{
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
@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 ..
|
|
@ -1,132 +0,0 @@
|
|||
# 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
|
|
@ -1,7 +0,0 @@
|
|||
-o "gt_dem"
|
||||
|
||||
gt_main
|
||||
bg_lib
|
||||
q_math
|
||||
q_shared
|
||||
..\..\gt_syscalls
|
|
@ -1,37 +0,0 @@
|
|||
// 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;
|
||||
|
|
@ -1,439 +0,0 @@
|
|||
// 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,7 +17,6 @@ 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
|
||||
|
||||
|
@ -27,38 +26,8 @@ CPP=cl.exe
|
|||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "gt_dm - Win32 Debug"
|
||||
!IF "$(CFG)" == "gt_dm - Win32 Debug SoF2"
|
||||
|
||||
# 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"
|
||||
|
@ -82,7 +51,6 @@ 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 "..\..\..\Debug\base\MP\vm"
|
||||
copy *.map "..\..\..\Debug\base\MP\vm"
|
||||
copy *.qvm "..\..\..\Debug\base\MP\vm"
|
||||
mkdir "..\..\..\..\base\vm"
|
||||
copy *.map "..\..\..\..\base\vm"
|
||||
copy *.qvm "..\..\..\..\base\vm"
|
||||
|
||||
:quit
|
||||
cd ..
|
||||
|
|
|
@ -17,7 +17,6 @@ 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
|
||||
|
||||
|
@ -27,38 +26,8 @@ CPP=cl.exe
|
|||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "gt_inf - Win32 Debug"
|
||||
!IF "$(CFG)" == "gt_inf - Win32 Debug SoF2"
|
||||
|
||||
# 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"
|
||||
|
@ -82,7 +51,6 @@ 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_RegisterSound ( "sound/ctf_flag.mp3" );
|
||||
gametype.caseCaptureSound = trap_Cmd_RegisterSound ( "sound/ctf_win.mp3" );
|
||||
gametype.caseReturnSound = trap_Cmd_RegisterSound ( "sound/ctf_return.mp3" );
|
||||
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" );
|
||||
|
||||
// Register the items
|
||||
memset ( &itemDef, 0, sizeof(itemDef) );
|
||||
|
@ -239,7 +239,6 @@ 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