Compare commits

...

3 commits

Author SHA1 Message Date
archive
b62bf6e859 as released 2002-10-15 2002-10-15 00:00:00 +00:00
archive
db6a3bc168 as released 2002-09-24 2002-09-24 00:00:00 +00:00
archive
a4cc9a51a3 as released 2002-07-19 2002-07-19 00:00:00 +00:00
80 changed files with 1867 additions and 1901 deletions

View file

@ -1,140 +0,0 @@
{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial{\*\falt Helvetica};}
{\f12\froman\fcharset0\fprq2{\*\panose 00000000000000000000}New York{\*\falt Times New Roman};}{\f27\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Tahoma;}{\f38\fswiss\fcharset0\fprq2{\*\panose 020b0603020202020204}Trebuchet MS;}
{\f85\fnil\fcharset77\fprq0{\*\panose 00000000000000000000}Font14579{\*\falt Times New Roman};}{\f86\froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}{\f87\froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}
{\f89\froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}{\f90\froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}{\f91\froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}
{\f92\froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}{\f93\froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}{\f94\fswiss\fcharset238\fprq2 Arial CE{\*\falt Helvetica};}
{\f95\fswiss\fcharset204\fprq2 Arial Cyr{\*\falt Helvetica};}{\f97\fswiss\fcharset161\fprq2 Arial Greek{\*\falt Helvetica};}{\f98\fswiss\fcharset162\fprq2 Arial Tur{\*\falt Helvetica};}{\f99\fswiss\fcharset177\fprq2 Arial (Hebrew){\*\falt Helvetica};}
{\f100\fswiss\fcharset178\fprq2 Arial (Arabic){\*\falt Helvetica};}{\f101\fswiss\fcharset186\fprq2 Arial Baltic{\*\falt Helvetica};}{\f302\fswiss\fcharset238\fprq2 Tahoma CE;}{\f303\fswiss\fcharset204\fprq2 Tahoma Cyr;}
{\f305\fswiss\fcharset161\fprq2 Tahoma Greek;}{\f306\fswiss\fcharset162\fprq2 Tahoma Tur;}{\f307\fswiss\fcharset177\fprq2 Tahoma (Hebrew);}{\f308\fswiss\fcharset178\fprq2 Tahoma (Arabic);}{\f309\fswiss\fcharset186\fprq2 Tahoma Baltic;}
{\f390\fswiss\fcharset238\fprq2 Trebuchet MS CE;}{\f394\fswiss\fcharset162\fprq2 Trebuchet MS Tur;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;
\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{
\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f27\fs24\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\s1\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
\f38\fs48\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 1;}{\s2\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f38\fs36\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
\sbasedon0 \snext0 heading 2;}{\s3\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f38\fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 3;}{
\s4\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f38\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 4;}{
\s5\ql \li0\ri0\sb240\sa60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f38\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 5;}{
\s6\ql \li0\ri0\sb240\sa60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f38\fs16\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 6;}{\*\cs10 \additive Default Paragraph Font;}{\*\cs15 \additive \ul\cf0
\sbasedon10 Hyperlink;}{\*\cs16 \additive \ul\cf0 \sbasedon10 FollowedHyperlink;}{\s17\ql \li0\ri0\sb60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext17 Body;}
{\s18\ql \li0\ri0\sl480\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \caps\f85\fs54\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext18 Heading;}{
\s19\ql \fi-145\li288\ri0\sb60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin288\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 Bullet;}{\s20\ql \li0\ri0\widctlpar\nooverflow\faauto\rin0\lin0\itap0
\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 \sbasedon0 \snext20 Body Text;}}{\info{\title SOFTWARE LICENSE AGREEMENT}{\author Belinda M. Van Sickle}{\operator Rick Johnson}{\creatim\yr2002\mo5\dy9\hr14\min50}{\revtim\yr2002\mo5\dy9\hr14\min50}
{\printim\yr1999\mo8\dy13\hr8\min44}{\version2}{\edmins0}{\nofpages1}{\nofwords1706}{\nofchars9725}{\*\company Ignited Minds, LLC}{\nofcharsws11942}{\vern8247}}{\*\userprops {\propname Microsoft Theme}\proptype30{\staticval klingon-industrial 111}}
\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dghspace180\dgvspace180\dghorigin1701\dgvorigin1984\dghshow0\dgvshow0\jexpand\viewkind4\viewscale100\pgbrdrhead\pgbrdrfoot\htmautsp\nolnhtadjtbl\lnbrkrule
\fet0{\*\background {\shp{\*\shpinst\shpleft0\shptop0\shpright0\shpbottom0\shpfhdr0\shpbxmargin\shpbxignore\shpbymargin\shpbyignore\shpwr0\shpwrk0\shpfblwtxt1\shpz0\shplid1025{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
{\sp{\sn fillType}{\sv 3}}{\sp{\sn fillBlipName}{\sv indtextb}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn bWMode}{\sv 9}}{\sp{\sn fBackground}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}}}}\sectd
\linex0\endnhere\pgbrdropt32\sectlinegrid360\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4
\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}
{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s18\ql \li0\ri0\sl-480\slmult0
\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \caps\f85\fs54\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f1\fs20 SOFTWARE LICENSE AGREEMENT
\par }\pard\plain \s17\ql \li0\ri0\sb29\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20 IMPORTANT - READ CAREFULLY: YOUR USE OF THIS SOFTWARE (THE \'93PROGRAM\'94
) IS SUBJECT TO THE SOFTWARE LICENSE TERMS SET FORTH BELOW. THE \'93PROGRAM\'94 INCLUDES ALL SOFTWARE INCLUDED WITH THIS AGREEMENT, THE ASSOCIATED MEDIA, ANY PRINTED M
ATERIALS, AND ANY ON-LINE OR ELECTRONIC DOCUMENTATION, AND ANY AND ALL COPIES OF SUCH SOFTWARE AND MATERIALS. BY OPENING THIS PACKAGE, INSTALLING, AND/OR USING THE PROGRAM AND ANY SOFTWARE PROGRAMS INCLUDED WITHIN THE PROGRAM, YOU ACCEPT THE TERMS OF THIS
LICENSE WITH ACTIVISION, INC. (\'93ACTIVISION\'94).
\par
\par LIMITED USE LICENSE: Subject to the conditions described below, Activision grants you the non-exclusive, non-transferable, limited right and license to install and use one copy of the Program solely and exclu
sively for your personal use. All rights not specifically granted under this Agreement are reserved by Activision and, as applicable, Activision\rquote
s licensors. The Program is licensed, not sold, for your use. Your license confers no title or ownership in the
Program and should not be construed as a sale of any rights in the Program. All rights not specifically granted under this Agreement are reserved by Activision and, as applicable, its licensors.
\par
\par LICENSE CONDITIONS
\par You agree not to:
\par }\pard\plain \s19\ql \fi-113\li119\ri0\sb29\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin119\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20 \bullet \tab Exploit the Program
or any of its parts commercially, including but not limited to use at a cyber cafe, computer gaming center or any other location-based site. Activision may offer a separate Site License Agreement to permit you to make the Program available for commercial
use; see the contact information below.
\par \bullet \tab Sell, rent, lease, license, distribute or otherwise transfer this Program, or any copies of this Program, without the express prior written consent of Activision.
\par \bullet \tab Use the Program, or permit use of the Program, in a network, multi-user arrangement or remote access arrangement, including any on-line use, except as otherwise specifically provided by the Program.
\par \bullet \tab Use the Program, or permit use of the Program, on more than one computer, computer terminal, or workstation at the same time.
\par \bullet \tab Make copies of the Program or any part thereof, except for back up or archival purposes, or make copies of the materials accompanying the Program.
\par \bullet \tab Copy the Program onto a hard drive or other storage device; you must run the Program
from the included CD-ROM (although the Program itself may automatically copy a portion of the Program onto your hard drive during installation in order to run more efficiently).
\par \bullet \tab Reverse engineer, derive source code, modify, decompile, or disassemble the Program, in whole or in part.
\par \bullet \tab Remove, disable or circumvent any proprietary notices or labels contained on or within the Program.
\par \bullet \tab Export or re-export the Program or any copy or adaptation thereof in violation of any applicable laws or regulations.
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f27\fs24\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
\par }\pard\plain \s17\ql \li0\ri0\sb29\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20 OW
NERSHIP: All title, ownership rights and intellectual property rights in and to the Program and any and all copies thereof are owned by Activision or its licensors. The Program is protected by the copyright laws of the United States, international copyrig
ht treaties and conventions and other laws. The Program contains certain licensed materials and Activision\rquote
s licensors may protect their rights in the event of any violation of this Agreement. You agree not to remove, disable or circumvent any proprietary notices or labels contained on or within the Program.
\par
\par THE PROGRAM UTILITIES: The Program contains certain design, programming and processing utilities, tools, assets and other resources (\'93the Program Utilities\'94) for use with the Program that allow you to c
reate customized new game levels and other related game materials for personal use in connection with the Program (\'93New Game Materials\'94). The use of the Program Utilities is subject to the following additional license restrictions:
\par }\pard\plain \s19\ql \fi-108\li119\ri0\sb29\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin119\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20 \bullet \tab You agree that, as a c
ondition to your using the Program Utilities, you will not use or allow third parties to use the Program Utilities and the New Game Materials created by you for any commercial purposes, including but not limited to selling, renting, leasing, licensing, di
s
tributing, or otherwise transferring the ownership of such New Game Materials, whether on a stand alone basis or packaged in combination with the New Game Materials created by others, through any and all distribution channels, including, without limitatio
n
, retail sales and on-line electronic distribution. You agree not to solicit, initiate or encourage any proposal or offer from any person or entity to create any New Game Materials for commercial distribution. You agree to promptly inform Activision in wr
iting of any instances of your receipt of any such proposal or offer.
\par \bullet \tab If you decide to make available the use of the New Game Materials created by you to other gamers, you agree to do so solely without charge.
\par \bullet \tab New Game Materials shall not contain modifications to any COM, EXE or DLL files or to any other executable Product files.
\par \bullet \tab New Game Materials may be created only if such New Game Materials can be used exclusively in combination with the retail version of the Program. New Game Materials may not be designed to be used as a stand-alone product.
\par \bullet \tab New Game Materials must not contain any illegal, obscene or defamatory materials, materials that infringe rights of privacy and publicity of third parties or (without appropriate irrevocable licenses granted
specifically for that purpose) any trademarks, copyright-protected works or other properties of third parties.
\par \bullet \tab All New Game Materials must contain prominent identification at least in any on-line description and with reasonable duration on the opening screen: (a) the name and E-mail address of the New Game Materials\rquote
creator(s) and (b) the words \'93THIS MATERIAL IS NOT MADE OR SUPPORTED BY ACTIVISION.\'94
\par }\pard\plain \s17\ql \li0\ri0\sb29\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20
\par LIMITED WARRANTY: Activision warrants to the original consumer purchaser of the Program that the record
ing medium on which the Program is recorded will be free from defects in material and workmanship for 90 days from the date of purchase. If the recording medium is found defective within 90 days of original purchase, Activision agrees to replace, free of
c
harge, any product discovered to be defective within such period upon its receipt of the Product, postage paid, with proof of the date of purchase, as long as the Program is still being manufactured by Activision. In the event that the Program is no longe
r
available, Activision retains the right to substitute a similar program of equal or greater value. This warranty is limited to the recording medium containing the Program as originally provided by Activision and is not applicable to normal wear and tear.
This warranty shall not be applicable and shall be void if the defect has arisen through abuse, mistreatment, or neglect. Any implied warranties prescribed by statute are expressly limited to the 90-day period described above.}{\f1\fs20
\par }{\f1\fs20 EXCEPT AS SET FORTH ABOVE, TH
IS WARRANTY IS IN LIEU OF ALL OTHER WARRANTIES, WHETHER ORAL OR WRITTEN, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, AND NO OTHER REPRESENTATIONS OR CLAIMS OF ANY KIND SHALL BE BINDI
NG ON OR OBLIGATE ACTIVISION.
\par When returning the Program for warranty replacement please send the original product disks only in protective packaging and include: (1) a photocopy of your dated sales receipt; (2) your name and return address typed or clearl
y printed; (3) a brief note describing the defect, the problem(s) you are encountered and the system on which you are running the Program; (4) if you are returning the Program after the 90-day warranty period, but within one year after the date of purchas
e, please include check or money order for $10 U.S. (A$19 for Australia, or \'a310.00 for Europe) currency per CD or floppy disk replacement. Note: Certified mail recommended.
\par In the U.S. send to:
\par
\par Warranty Replacements
\par Activision, Inc.
\par P.O. Box 67713
\par Los Angeles, California 90067
\par
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f27\fs24\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f1\fs20 In Europe send to:
\par }{\f1\fs20
\par WARRANTY REPLACEMENTS
\par }\pard\plain \s20\ql \li0\ri0\widctlpar\nooverflow\faauto\rin0\lin0\itap0 \fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f1\fs20\lang1033\langfe1033\langnp1033
ACTIVISION (UK) Ltd., Parliament House, St Laurence Way, Slough, Berkshire, SL1 2BW, United Kingdom.
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f27\fs24\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20 Disc Replacement: +44 (0)}{\f1\fs20\cf6 }{\f1\fs20 8705 143 525
\par
\par }{\b\f1\fs20 In Australia send to:
\par }{\f1\fs20
\par Warranty Replacements
\par Activision
\par }\pard \ql \li0\ri0\widctlpar\nooverflow\faauto\rin0\lin0\itap0 {\f1\fs20 Century Plaza}{\f1\fs20\cf0
\par }{\f1\fs20 41 Rawson Street}{\f1\fs20
\par }{\f1\fs20 Epping, NSW 2121}{\f1\fs20
\par }{\f1\fs20 Australia
\par }\pard\plain \s17\ql \li0\ri0\sb29\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f12\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20
\par LIMITATION ON DAMAGES: IN NO EVENT WILL ACTIVISION BE LIABLE FOR SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES RESULTING FROM POSSESSION, USE OR MALFUNCTION OF THE PROGRAM, INCLUDING DAMAGES T
O PROPERTY, LOSS OF GOODWILL, COMPUTER FAILURE OR MALFUNCTION AND, TO THE EXTENT PERMITTED BY LAW, DAMAGES FOR PERSONAL INJURIES, EVEN IF ACTIVISION HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ACTIVISION\rquote
S LIABILITY SHALL NOT EXCEED THE ACTUAL PRI
CE PAID FOR THE LICENSE TO USE THIS PROGRAM. SOME STATES/COUNTRIES DO NOT ALLOW LIMITATIONS ON HOW LONG AN IMPLIED WARRANTY LASTS AND/OR THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATIONS AND/OR EXCLUSION OR LIMIT
ATION OF LIABILITY MAY NOT APPLY TO YOU. THIS WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS, AND YOU MAY HAVE OTHER RIGHTS WHICH VARY FROM JURISDICTION TO JURISDICTION.
\par TERMINATION: Without prejudice to any other rights of Activision, this Agreement will terminate automatically if you fail to comply with its terms and conditions. In such event, you must destroy all copies of the Program and all of its component parts.
\par
\par U.S. GOVERNMENT RESTRICTED RIGHTS: the Program and documentation have been developed entirely at private expense and are provided as \'93Commercial Computer Software\'94 or \'93restricted computer software.\'94
Use, duplication or disclosure by the U.S. Government or a U.S. Government subcontractor is subject to the restrictions set forth in subparagraph (c)(1)
(ii) of the Rights in Technical Data and Computer Software clauses in DFARS 252.227-7013 or as set forth in subparagraph (c)(1) and (2) of the Commercial Computer Software Restricted Rights clauses at FAR 52.227-19, as applicable. The Contractor/Manufactu
rer is Activision, Inc., 3100 Ocean Park Boulevard, Santa Monica, California 90405.
\par
\par INJUNCTION: Because Activision would be irreparably damaged if the terms of this Agreement were not specifically enforced, you agree that Activision shall be entitled, with
out bond, other security or proof of damages, to appropriate equitable remedies with respect to breaches of this Agreement, in addition to such other remedies as Activision may otherwise have under applicable laws.
\par
\par INDEMNITY: You agree to indemnify, defen
d and hold Activision, its partners, licensors, affiliates, contractors, officers, directors, employees and agents harmless from all damages, losses and expenses arising directly or indirectly from your acts and omissions to act in using the Product pursu
ant to the terms of this Agreement
\par
\par MISCELLANEOUS: This Agreement represents the complete agreement concerning this license between the parties and supersedes all prior agreements and representations between them. It may be amended only by a writing execut
ed by both parties. If any provision of this Agreement is held to be unenforceable for any reason, such provision shall be reformed only to the extent necessary to make it enforceable and the remaining provisions of this Agreement shall not be affected. T
h
is Agreement shall be construed under California law as such law is applied to agreements between California residents entered into and to be performed within California, except as governed by federal law and you consent to the exclusive jurisdiction of t
he state and federal courts in Los Angeles, California.
\par
\par If you have any questions concerning this license, you may contact Activision at 3100 Ocean Park Boulevard, Santa Monica, California 90405, USA, (310) 255-2000, Attn. Business and Legal Affairs, legal@activision.com.
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f27\fs24\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20
\par }}

BIN
bin/AnimatEd.exe Normal file

Binary file not shown.

18
bin/README.txt Normal file
View file

@ -0,0 +1,18 @@
October 15th, 2002 - Thank you for downloading the sof2sdk-101b.zip file. This release contains the .ini
files for AnimatEd and SklView which allow you to change the load location for SDK files.
For exampe if you installed the SDK in E:\SOF2SDK, this should be entered into each file.
Both programs will assume that the base directory is one level deeper than your SDK directory. The
programs also assume the ext_data and skeletons directories are a level lower than that:
So if I installed in C:\SDK, I unpacked the pk3's and made a base
structure like this:
C:\SDK\base\skeletons
C:\SDK\base\ext_data
As always, these tools are released "as is" with no support from Raven Software or Activision.
Happy Modding!
- The SOF2 Development Team

Binary file not shown.

BIN
bin/SoF2MPDev.exe Normal file

Binary file not shown.

1
bin/animatEd.ini Normal file
View file

@ -0,0 +1 @@
C:\SDK

1
bin/sklview.ini Normal file
View file

@ -0,0 +1 @@
C:\SDK

BIN
bin/sof2sdk-eula.doc Normal file

Binary file not shown.

View file

@ -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 # Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT ** # ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Generic Project" 0x010a # 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 This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run !MESSAGE use the Export Makefile command and run
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "Sof2MP.mak". !MESSAGE NMAKE /f "SoF2MP.mak".
!MESSAGE !MESSAGE
!MESSAGE You can specify a configuration when running NMAKE !MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "Sof2MP.mak" CFG="Sof2MP - Win32 Debug" !MESSAGE NMAKE /f "SoF2MP.mak" CFG="SoF2MP - Win32 Debug"
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !MESSAGE
!MESSAGE "Sof2MP - Win32 Release" (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 "SoF2MP - Win32 Debug" (based on "Win32 (x86) Generic Project")
!MESSAGE !MESSAGE
# Begin Project # Begin Project
# PROP AllowPerConfigDependencies 0 # PROP AllowPerConfigDependencies 0
MTL=midl.exe MTL=midl.exe
!IF "$(CFG)" == "Sof2MP - Win32 Release" !IF "$(CFG)" == "SoF2MP - Win32 Release"
# PROP BASE Use_MFC 0 # PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0 # PROP BASE Use_Debug_Libraries 0
@ -38,7 +38,7 @@ MTL=midl.exe
# PROP Intermediate_Dir "Release" # PROP Intermediate_Dir "Release"
# PROP Target_Dir "" # PROP Target_Dir ""
!ELSEIF "$(CFG)" == "Sof2MP - Win32 Debug" !ELSEIF "$(CFG)" == "SoF2MP - Win32 Debug"
# PROP BASE Use_MFC 0 # PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1 # PROP BASE Use_Debug_Libraries 1
@ -55,7 +55,7 @@ MTL=midl.exe
# Begin Target # Begin Target
# Name "Sof2MP - Win32 Release" # Name "SoF2MP - Win32 Release"
# Name "Sof2MP - Win32 Debug" # Name "SoF2MP - Win32 Debug"
# End Target # End Target
# End Project # End Project

View file

@ -3,6 +3,45 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
############################################################################### ###############################################################################
Project: "SoF2MP"=.\SoF2MP.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name gt_ctf
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_dem
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_dm
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_elim
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_inf
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_tdm
End Project Dependency
Begin Project Dependency
Project_Dep_Name SoF2cgame
End Project Dependency
Begin Project Dependency
Project_Dep_Name SoF2game
End Project Dependency
Begin Project Dependency
Project_Dep_Name ui
End Project Dependency
}}}
###############################################################################
Project: "SoF2cgame"=.\cgame\sof2_cgame.dsp - Package Owner=<4> Project: "SoF2cgame"=.\cgame\sof2_cgame.dsp - Package Owner=<4>
Package=<5> Package=<5>
@ -27,54 +66,6 @@ Package=<4>
############################################################################### ###############################################################################
Project: "SoF2ui"=.\ui\sof2_ui.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "Sof2MP"=.\Sof2MP.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name SoF2cgame
End Project Dependency
Begin Project Dependency
Project_Dep_Name SoF2game
End Project Dependency
Begin Project Dependency
Project_Dep_Name SoF2ui
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_ctf
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_dm
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_elim
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_inf
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_tdm
End Project Dependency
}}}
###############################################################################
Project: "gt_ctf"=.\gametype\gt_ctf\gt_ctf.dsp - Package Owner=<4> Project: "gt_ctf"=.\gametype\gt_ctf\gt_ctf.dsp - Package Owner=<4>
Package=<5> Package=<5>
@ -91,10 +82,6 @@ Project: "gt_dem"=.\gametype\gt_dem\gt_dem.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
begin source code control
"$/SoF2/code/gametype/gt_dem", ZRDAAAAA
.\gametype\gt_dem
end source code control
}}} }}}
Package=<4> Package=<4>
@ -151,6 +138,18 @@ Package=<4>
############################################################################### ###############################################################################
Project: "ui"=.\ui\sof2_ui.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global: Global:
Package=<5> Package=<5>

View file

@ -586,6 +586,7 @@ void CG_InitConsoleCommands( void )
// //
trap_AddCommand ("kill"); trap_AddCommand ("kill");
trap_AddCommand ("say"); trap_AddCommand ("say");
trap_AddCommand ("ignore");
trap_AddCommand ("say_team"); trap_AddCommand ("say_team");
trap_AddCommand ("tell"); trap_AddCommand ("tell");
trap_AddCommand ("vsay_team"); trap_AddCommand ("vsay_team");

View file

@ -337,6 +337,22 @@ static void CG_DrawTeamScores ( float y )
char scores[2][16]; char scores[2][16];
float w; float w;
const char* s; 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 ) if ( cgs.scores1 == SCORE_NOT_PRESENT )
{ {
@ -354,13 +370,72 @@ static void CG_DrawTeamScores ( float y )
else else
{ {
Com_sprintf (scores[1], sizeof(scores[1]), "%i", cgs.scores2); 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 );
} }
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 );
} }
/* /*
@ -1046,6 +1121,11 @@ static void CG_DrawCrosshair(void)
scale = 1; scale = 1;
} }
if ( scale > 2 )
{
scale = 2;
}
w = w * scale; w = w * scale;
h = h * scale; h = h * scale;
@ -1736,16 +1816,15 @@ static void CG_Draw2D( void )
CG_DrawUpperRight(); CG_DrawUpperRight();
} }
if ( !CG_DrawFollow() )
{
CG_DrawWarmup();
}
// don't draw center string if scoreboard is up // don't draw center string if scoreboard is up
cg.scoreBoardShowing = CG_DrawScoreboard(); cg.scoreBoardShowing = CG_DrawScoreboard();
if ( !cg.scoreBoardShowing) if ( !cg.scoreBoardShowing)
{ {
CG_DrawCenterText(); CG_DrawCenterText();
if ( !CG_DrawFollow() )
{
CG_DrawWarmup();
}
} }
// Always Draw chat // Always Draw chat

View file

@ -353,6 +353,7 @@ static void CG_Obituary( entityState_t *ent )
case MOD_M1911A1_PISTOL: case MOD_M1911A1_PISTOL:
case MOD_USSOCOM_PISTOL: case MOD_USSOCOM_PISTOL:
case MOD_SILVER_TALON:
if ( attack == ATTACK_ALTERNATE ) if ( attack == ATTACK_ALTERNATE )
{ {
message = "was pistol whipped by"; message = "was pistol whipped by";
@ -377,11 +378,24 @@ static void CG_Obituary( entityState_t *ent )
} }
break; 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_M60_MACHINEGUN:
case MOD_MICRO_UZI_SUBMACHINEGUN: case MOD_MICRO_UZI_SUBMACHINEGUN:
case MOD_MP5: case MOD_MP5:
case MOD_M3A1_SUBMACHINEGUN: case MOD_M3A1_SUBMACHINEGUN:
case MOD_M4_ASSAULT_RIFLE: case MOD_SIG551:
message = "was shot by"; message = "was shot by";
message2 = va("'s %s", weaponParseInfo[mod].mName ); message2 = va("'s %s", weaponParseInfo[mod].mName );
break; break;
@ -778,6 +792,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.waterWade[rand()%2], -1, -1 ); trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.waterWade[rand()%2], -1, -1 );
break; break;
case EV_ITEM_PICKUP_QUIET:
case EV_ITEM_PICKUP: case EV_ITEM_PICKUP:
{ {
gitem_t *item; gitem_t *item;
@ -790,7 +805,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
autoswitch = (es->eventParm & ITEM_AUTOSWITCHBIT)?qtrue:qfalse; autoswitch = (es->eventParm & ITEM_AUTOSWITCHBIT)?qtrue:qfalse;
// player predicted index // player predicted index
index = es->eventParm & ~ITEM_AUTOSWITCHBIT; index = es->eventParm & ~(ITEM_AUTOSWITCHBIT|ITEM_QUIETPICKUP);
if ( index < 1 || index >= bg_numItems ) if ( index < 1 || index >= bg_numItems )
{ {
@ -799,7 +814,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
item = &bg_itemlist[ index ]; item = &bg_itemlist[ index ];
if ( item->pickup_sound ) if ( event != EV_ITEM_PICKUP_QUIET && item->pickup_sound )
{ {
trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound ), -1, -1 ); trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound ), -1, -1 );
} }
@ -939,7 +954,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
case EV_BULLET_HIT_WALL: case EV_BULLET_HIT_WALL:
DEBUGNAME("EV_BULLET_HIT_WALL"); DEBUGNAME("EV_BULLET_HIT_WALL");
if ( !(cg_antiLag.integer && cg_impactPrediction.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) ) if ( !(cg_antiLag.integer && cg_impactPrediction.integer && !cg_synchronousClients.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) )
{ {
// eventParm contains the direction byte and the material id // eventParm contains the direction byte and the material id
ByteToDir( (es->eventParm >> MATERIAL_BITS), dir ); ByteToDir( (es->eventParm >> MATERIAL_BITS), dir );
@ -970,7 +985,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
} }
#ifdef _SOF2_FLESHIMPACTPREDICTION #ifdef _SOF2_FLESHIMPACTPREDICTION
if ( !(cg_antiLag.integer && cg_impactPrediction.integer >= 2 && es->otherEntityNum == cg.predictedPlayerState.clientNum ) ) if ( !(cg_antiLag.integer && cg_impactPrediction.integer >= 2 && !!cg_synchronousClients.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) )
#endif #endif
{ {
int fxtype = MATERIAL_FLESH; int fxtype = MATERIAL_FLESH;

View file

@ -236,6 +236,7 @@ void CG_DoGoreFromWeapon( int weaponnum, int attack, vec3_t hitloc, vec3_t hitdi
// Smaller guns with pistol whip altfires // Smaller guns with pistol whip altfires
case WP_M1911A1_PISTOL: case WP_M1911A1_PISTOL:
case WP_SILVER_TALON:
case WP_USSOCOM_PISTOL: case WP_USSOCOM_PISTOL:
if (attack==ATTACK_ALTERNATE) if (attack==ATTACK_ALTERNATE)
{ // Bonk on the head { // Bonk on the head
@ -293,6 +294,7 @@ void CG_DoGoreFromWeapon( int weaponnum, int attack, vec3_t hitloc, vec3_t hitdi
// Medium guns // Medium guns
case WP_M3A1_SUBMACHINEGUN: case WP_M3A1_SUBMACHINEGUN:
case WP_MP5: case WP_MP5:
case WP_SIG551:
CG_AddGore(irand(PGORE_BULLET_E, PGORE_BULLET_G), flrand( 5.25f, 7.5f), CG_AddGore(irand(PGORE_BULLET_E, PGORE_BULLET_G), flrand( 5.25f, 7.5f),
hitloc, hitdirection, entnum, entposition, entangle, ghoul2); hitloc, hitdirection, entnum, entposition, entangle, ghoul2);
if (cg_goreDetail.integer>0) if (cg_goreDetail.integer>0)

View file

@ -265,7 +265,19 @@ void CG_DrawInformation( void )
cg.cheats = qtrue; cg.cheats = qtrue;
} }
else 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; cg.cheats = qfalse;
}
s = cgs.gametypeData->displayName; s = cgs.gametypeData->displayName;
CG_DrawText ( 320 - trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.53f, 0 ) / 2, y, CG_DrawText ( 320 - trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.53f, 0 ) / 2, y,
@ -289,6 +301,15 @@ void CG_DrawInformation( void )
cgs.media.hudFont, 0.53f, colorWhite, s, 0, 0 ); cgs.media.hudFont, 0.53f, colorWhite, s, 0, 0 );
y += PROP_HEIGHT; 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;
}
} }
/* /*

View file

@ -712,6 +712,7 @@ typedef struct
int timelimit; int timelimit;
int maxclients; int maxclients;
qboolean friendlyFire; qboolean friendlyFire;
qboolean punkbuster;
char mapname[MAX_QPATH]; char mapname[MAX_QPATH];
char gameover[MAX_QPATH]; char gameover[MAX_QPATH];
@ -905,6 +906,8 @@ void CG_LoadMenus ( const char *menuFile);
void CG_KeyEvent ( int key, qboolean down); void CG_KeyEvent ( int key, qboolean down);
void CG_MouseEvent ( int x, int y); void CG_MouseEvent ( int x, int y);
void CG_EventHandling ( int type); void CG_EventHandling ( int type);
int CG_TeamCount ( int team );
// //
// cg_view.c // cg_view.c

View file

@ -27,6 +27,7 @@ static void C_GetLerpAngles (void);
static void C_GetModelScale (void); static void C_GetModelScale (void);
static void C_Trace (void); static void C_Trace (void);
static void C_CameraShake (void); static void C_CameraShake (void);
int CG_TeamScore ( int team );
/* /*
================ ================
@ -132,6 +133,7 @@ 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 // server is going to attempt to send out multiple broadcasts in hopes that
// the client will receive one of them // the client will receive one of them
cg.mMapChange = qtrue; cg.mMapChange = qtrue;
cgs.voteTime = cgs.voteDuration = 0;
trap_S_ClearLoopingSounds ( qtrue ); trap_S_ClearLoopingSounds ( qtrue );
trap_S_StopAllSounds ( ); trap_S_StopAllSounds ( );
trap_UI_CloseAll ( ); trap_UI_CloseAll ( );
@ -160,6 +162,12 @@ int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int a
return 0; return 0;
case CG_GET_TEAM_COUNT:
return CG_TeamCount ( arg0 );
case CG_GET_TEAM_SCORE:
return CG_TeamScore ( arg0 );
default: default:
Com_Error( ERR_FATAL, "vmMain: unknown command %i", command ); Com_Error( ERR_FATAL, "vmMain: unknown command %i", command );
break; break;
@ -501,6 +509,7 @@ void CG_RegisterCvars( void )
trap_Cvar_Register(NULL, "ui_about_gametypename", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 ); trap_Cvar_Register(NULL, "ui_about_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_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_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_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_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 ); trap_Cvar_Register(NULL, "ui_about_mapname", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
@ -544,6 +553,59 @@ static void CG_ForceModelChange( void )
} }
} }
/*
==================
CG_TeamScore
==================
*/
int CG_TeamScore ( int team )
{
switch ( team )
{
case TEAM_RED:
return cg.predictedPlayerState.persistant[PERS_RED_SCORE];
case TEAM_BLUE:
return cg.predictedPlayerState.persistant[PERS_BLUE_SCORE];
}
return 0;
}
/*
==================
CG_TeamCount
==================
*/
int CG_TeamCount ( int team )
{
int count;
int i;
count = 0;
for ( i = 0 ; i < cgs.maxclients ; i++ )
{
clientInfo_t* cl;
cl = &cgs.clientinfo[ i ];
if ( !cl->infoValid )
{
continue;
}
if ( team != cl->team )
{
continue;
}
count++;
}
return count;
}
/* /*
================== ==================
CG_UpdateTeamCountCvars CG_UpdateTeamCountCvars
@ -1913,6 +1975,11 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum )
if ( cgs.gametypeData->description || cgs.pickupsDisabled || cgs.gametypeData->teams ) if ( cgs.gametypeData->description || cgs.pickupsDisabled || cgs.gametypeData->teams )
{ {
cg.popupObjectives = qtrue; 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_gametype", va("%i",cgs.gametype ) );

View file

@ -56,14 +56,8 @@ static void CG_DrawPlayerSniperBullet ( rectDef_t* rect, qhandle_t shader, int b
static void CG_DrawPlayerSniperMagnification ( rectDef_t *rect, qhandle_t font, float scale, vec4_t color ) static void CG_DrawPlayerSniperMagnification ( rectDef_t *rect, qhandle_t font, float scale, vec4_t color )
{ {
const char* mag; const char* mag;
switch ( cg.predictedPlayerState.zoomFov ) mag = weaponData[cg.predictedPlayerState.weapon].zoom[cg.predictedPlayerState.zoomFov].name;
{
default:
case 20: mag = "5x"; break;
case 10: mag = "10x"; break;
case 5: mag = "20x"; break;
}
// Center the text // Center the text
CG_DrawText (rect->x, rect->y, font, scale, color, mag, 0, 0 ); CG_DrawText (rect->x, rect->y, font, scale, color, mag, 0, 0 );
@ -574,6 +568,19 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param )
visible = (cg.predictedPlayerState.pm_flags&PMF_ZOOMED)?qtrue:qfalse; visible = (cg.predictedPlayerState.pm_flags&PMF_ZOOMED)?qtrue:qfalse;
flags &= ~(CG_SHOW_HUD_SNIPERSCOPE); 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 // Draw the health as long as we arent zoomed
else if ( flags & CG_SHOW_HUD_HEALTH ) else if ( flags & CG_SHOW_HUD_HEALTH )
{ {
@ -597,9 +604,12 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param )
// Should the alternate weapon information be shown? // Should the alternate weapon information be shown?
else if (flags & (CG_SHOW_PLAYER_ALT_WEAPONINFO|CG_HIDE_PLAYER_ALT_WEAPONINFO) ) else if (flags & (CG_SHOW_PLAYER_ALT_WEAPONINFO|CG_HIDE_PLAYER_ALT_WEAPONINFO) )
{ {
if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) if ( cg.predictedPlayerState.weapon == WP_MSG90A1 )
{ {
visible = qfalse; if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED )
{
visible = qfalse;
}
} }
if ( cg.showScores ) if ( cg.showScores )
@ -623,7 +633,7 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param )
// INvert the visible flag for hidden // INvert the visible flag for hidden
if ( flags & CG_HIDE_PLAYER_ALT_WEAPONINFO ) if ( flags & CG_HIDE_PLAYER_ALT_WEAPONINFO )
{ {
if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) if ( cg.predictedPlayerState.weapon == WP_MSG90A1 && (cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) )
{ {
visible = qfalse; visible = qfalse;
} }
@ -639,7 +649,12 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param )
// Draw the weapon info when we arent zoomed // Draw the weapon info when we arent zoomed
else if ( flags & CG_SHOW_HUD_WEAPONINFO ) else if ( flags & CG_SHOW_HUD_WEAPONINFO )
{ {
visible = (cg.showScores||(cg.predictedPlayerState.pm_flags&PMF_ZOOMED))?qfalse:qtrue; qboolean zoomed = qfalse;
if ( cg.predictedPlayerState.weapon == WP_MSG90A1 && (cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) )
{
zoomed = qtrue;
}
visible = (cg.showScores||zoomed)?qfalse:qtrue;
flags &= ~(CG_SHOW_HUD_WEAPONINFO); flags &= ~(CG_SHOW_HUD_WEAPONINFO);
} }
else if (flags & CG_SHOW_ANYTEAMGAME) else if (flags & CG_SHOW_ANYTEAMGAME)

View file

@ -578,6 +578,7 @@ static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader )
{ {
int rf; int rf;
refEntity_t ent; refEntity_t ent;
clientInfo_t *ci = &cgs.clientinfo[cent->currentState.clientNum];
if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson ) if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson )
{ {
@ -590,8 +591,6 @@ static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader )
} }
memset( &ent, 0, sizeof( ent ) ); memset( &ent, 0, sizeof( ent ) );
VectorCopy( cent->lerpOrigin, ent.origin );
ent.origin[2] += 58;
ent.reType = RT_SPRITE; ent.reType = RT_SPRITE;
ent.customShader = shader; ent.customShader = shader;
ent.radius = 10; ent.radius = 10;
@ -600,6 +599,20 @@ static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader )
ent.shaderRGBA[1] = 255; ent.shaderRGBA[1] = 255;
ent.shaderRGBA[2] = 255; ent.shaderRGBA[2] = 255;
ent.shaderRGBA[3] = 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 ); trap_R_AddRefEntityToScene( &ent );
} }
@ -861,21 +874,12 @@ static void CG_UpdatePlayerAnimations ( centity_t* cent )
CG_PlayerGametypeItems CG_PlayerGametypeItems
=============== ===============
*/ */
void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles ) void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles, int rf )
{ {
clientInfo_t *ci = &cgs.clientinfo[cent->currentState.clientNum]; clientInfo_t *ci = &cgs.clientinfo[cent->currentState.clientNum];
int i; int i;
int rf;
if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson ) rf = rf & RF_THIRD_PERSON;
{
// only show in mirrors
rf = RF_THIRD_PERSON;
}
else
{
rf = 0;
}
// If the player is wearing goggles then draw them on their head // If the player is wearing goggles then draw them on their head
if ( cent->currentState.eFlags & EF_GOGGLES ) if ( cent->currentState.eFlags & EF_GOGGLES )
@ -924,7 +928,10 @@ void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles )
memset ( &item, 0, sizeof(item) ); memset ( &item, 0, sizeof(item) );
item.renderfx = rf | RF_MINLIGHT; item.renderfx = rf | RF_MINLIGHT;
item.ghoul2 = cg_items[ MODELINDEX_GAMETYPE_ITEM + i ].boltModel; item.ghoul2 = cg_items[ MODELINDEX_GAMETYPE_ITEM + i ].boltModel;
G2_PositionEntityOnBolt ( &item, cent->ghoul2, 0, ci->boltGametypeItems[i], cent->lerpOrigin, angles, cent->modelScale ); if ( !G2_PositionEntityOnBolt ( &item, cent->ghoul2, 0, ci->boltGametypeItems[i], cent->lerpOrigin, angles, cent->modelScale ) )
{
ci->boltGametypeItems[i] = -1;
}
trap_R_AddRefEntityToScene(&item); trap_R_AddRefEntityToScene(&item);
} }
} }
@ -959,7 +966,10 @@ void CG_UpdatePlayerWeaponModel ( centity_t* cent, qboolean force )
// If the weapon model hasnt changed then dont update it // If the weapon model hasnt changed then dont update it
else if ( !force && cent->currentState.weapon == cent->pe.weapon ) else if ( !force && cent->currentState.weapon == cent->pe.weapon )
{ {
return; if ( -1 != trap_G2API_GetBoltIndex ( cent->ghoul2, cent->pe.weaponModelSpot ) )
{
return;
}
} }
else else
{ {
@ -972,7 +982,7 @@ void CG_UpdatePlayerWeaponModel ( centity_t* cent, qboolean force )
} }
// Get rid of whats in their hand // Get rid of whats in their hand
if ( cent->pe.weaponModelSpot ) if ( cent->pe.weaponModelSpot && cent->pe.weaponModelSpot != -1 )
{ {
trap_G2API_DetachG2Model ( cent->ghoul2, cent->pe.weaponModelSpot ); trap_G2API_DetachG2Model ( cent->ghoul2, cent->pe.weaponModelSpot );
trap_G2API_RemoveGhoul2Model( &cent->ghoul2, cent->pe.weaponModelSpot ); trap_G2API_RemoveGhoul2Model( &cent->ghoul2, cent->pe.weaponModelSpot );
@ -1211,7 +1221,7 @@ void CG_Player( centity_t *cent )
// Render any of the floating sprites above the players head // Render any of the floating sprites above the players head
CG_PlayerSprites ( cent ); CG_PlayerSprites ( cent );
CG_PlayerGametypeItems ( cent, cent->pe.ghoulLegsAngles ); CG_PlayerGametypeItems ( cent, cent->pe.ghoulLegsAngles, renderfx );
VectorCopy ( save, cent->lerpOrigin ); VectorCopy ( save, cent->lerpOrigin );
} }
@ -1225,6 +1235,11 @@ A player just came into view or teleported, so reset all animation info
*/ */
void CG_ResetPlayerEntity( centity_t *cent ) 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->errorTime = -99999; // guarantee no error decay added
cent->extrapolated = qfalse; cent->extrapolated = qfalse;
@ -1236,6 +1251,7 @@ void CG_ResetPlayerEntity( centity_t *cent )
cent->pe.legs.anim = -1; cent->pe.legs.anim = -1;
cent->pe.torso.anim = -1; cent->pe.torso.anim = -1;
cent->pe.weapon = -1;
memset( &cent->pe.legs, 0, sizeof( cent->pe.legs ) ); memset( &cent->pe.legs, 0, sizeof( cent->pe.legs ) );
cent->pe.legs.yawAngle = cent->rawAngles[YAW]; cent->pe.legs.yawAngle = cent->rawAngles[YAW];
@ -1248,6 +1264,12 @@ void CG_ResetPlayerEntity( centity_t *cent )
cent->pe.torso.yawing = qfalse; cent->pe.torso.yawing = qfalse;
cent->pe.torso.pitchAngle = cent->rawAngles[PITCH]; cent->pe.torso.pitchAngle = cent->rawAngles[PITCH];
cent->pe.torso.pitching = qfalse; cent->pe.torso.pitching = qfalse;
// Reset all bolt position
for ( i = 0; i < MAX_GAMETYPE_ITEMS; i ++ )
{
ci->boltGametypeItems[i] = -1;
}
} }
/* /*

View file

@ -226,7 +226,7 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops )
} }
// Look for a zoom transition that isnt the first zoom in // Look for a zoom transition that isnt the first zoom in
if ( ops->zoomFov && (ps->zoomFov != ops->zoomFov) ) if ( weaponData[ops->weapon].zoom[ops->zoomFov].fov && (weaponData[ps->weapon].zoom[ps->zoomFov].fov != weaponData[ops->weapon].zoom[ops->zoomFov].fov) )
{ {
trap_S_StartLocalSound ( cgs.media.zoomSound, CHAN_AUTO ); trap_S_StartLocalSound ( cgs.media.zoomSound, CHAN_AUTO );
} }
@ -252,6 +252,9 @@ void CG_TransitionPlayerState( playerState_t *ps, playerState_t *ops )
cg.thisFrameTeleport = qtrue; cg.thisFrameTeleport = qtrue;
// make sure we don't get any unwanted transition effects // make sure we don't get any unwanted transition effects
*ops = *ps; *ops = *ps;
CG_SetWeaponAnim(ps->weaponAnimId&(~ANIM_TOGGLEBIT),ps);
CG_UpdateViewWeaponSurfaces ( ps );
} }
// damage events (player is getting wounded) // damage events (player is getting wounded)

View file

@ -369,6 +369,7 @@ static void CG_TouchItem( centity_t *cent )
{ {
gitem_t *item; gitem_t *item;
qboolean autoswitch = qfalse; qboolean autoswitch = qfalse;
int eventID;
if ( !cg_predictItems.integer ) if ( !cg_predictItems.integer )
{ {
@ -413,8 +414,17 @@ static void CG_TouchItem( centity_t *cent )
} }
} }
if ( cg.predictedPlayerState.pm_flags & PMF_DUCKED )
{
eventID = EV_ITEM_PICKUP_QUIET;
}
else
{
eventID = EV_ITEM_PICKUP;
}
// grab it // grab it
BG_AddPredictableEventToPlayerstate( EV_ITEM_PICKUP, cent->currentState.modelindex|(autoswitch?ITEM_AUTOSWITCHBIT:0) , &cg.predictedPlayerState); BG_AddPredictableEventToPlayerstate( eventID, cent->currentState.modelindex|(autoswitch?ITEM_AUTOSWITCHBIT:0) , &cg.predictedPlayerState);
// remove it from the frame so it won't be drawn // remove it from the frame so it won't be drawn
cent->currentState.eFlags |= EF_NODRAW; cent->currentState.eFlags |= EF_NODRAW;

View file

@ -346,6 +346,9 @@ typedef enum
CG_VOICE_EVENT, CG_VOICE_EVENT,
CG_GET_TEAM_COUNT,
CG_GET_TEAM_SCORE,
} cgameExport_t; } cgameExport_t;
// CG_POINT_CONTENTS // CG_POINT_CONTENTS

View file

@ -90,6 +90,7 @@ void CG_ParseServerinfo( void )
cgs.timelimit = atoi( Info_ValueForKey( info, "timelimit" ) ); cgs.timelimit = atoi( Info_ValueForKey( info, "timelimit" ) );
cgs.maxclients = atoi( Info_ValueForKey( info, "sv_maxclients" ) ); cgs.maxclients = atoi( Info_ValueForKey( info, "sv_maxclients" ) );
cgs.friendlyFire = atoi( Info_ValueForKey( info, "g_friendlyFire" ) ) ? qtrue : qfalse; 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" ); mapname = Info_ValueForKey( info, "mapname" );
Com_sprintf( cgs.mapname, sizeof( cgs.mapname ), "maps/%s.bsp", mapname ); Com_sprintf( cgs.mapname, sizeof( cgs.mapname ), "maps/%s.bsp", mapname );
@ -97,6 +98,7 @@ void CG_ParseServerinfo( void )
trap_Cvar_Set ( "ui_about_gametypename", cgs.gametypeData->displayName ); trap_Cvar_Set ( "ui_about_gametypename", cgs.gametypeData->displayName );
trap_Cvar_Set ( "ui_about_scorelimit", va("%i", cgs.scorelimit ) ); 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_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_maxclients", va("%i", cgs.maxclients ) );
trap_Cvar_Set ( "ui_about_dmflags", va("%i", cgs.dmflags ) ); trap_Cvar_Set ( "ui_about_dmflags", va("%i", cgs.dmflags ) );
trap_Cvar_Set ( "ui_about_mapname", mapname ); trap_Cvar_Set ( "ui_about_mapname", mapname );

View file

@ -27,8 +27,6 @@ static void CG_ResetEntity( centity_t *cent )
{ {
CG_ResetPlayerEntity( cent ); CG_ResetPlayerEntity( cent );
} }
cent->pe.weapon = 0;
} }
/* /*

View file

@ -588,7 +588,6 @@ static void CG_OffsetFirstPersonView( void )
float f; float f;
vec3_t predictedVelocity; vec3_t predictedVelocity;
int timeDelta; int timeDelta;
vec3_t right;
if ( cg.snap->ps.pm_type == PM_INTERMISSION ) { if ( cg.snap->ps.pm_type == PM_INTERMISSION ) {
return; return;
@ -732,8 +731,8 @@ static void CG_OffsetFirstPersonView( void )
leanOffset = (float)(cg.predictedPlayerState.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET; leanOffset = (float)(cg.predictedPlayerState.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET;
angles[ROLL] += leanOffset / 4; angles[ROLL] += leanOffset / 4;
AngleVectors( cg.predictedPlayerState.viewangles, NULL, right, NULL );
VectorMA( origin, leanOffset, right, origin ); BG_ApplyLeanOffset ( &cg.predictedPlayerState, origin );
} }
// Make sure view doesnt invert on itself // Make sure view doesnt invert on itself
@ -856,7 +855,7 @@ static int CG_CalcFov( void ) {
if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED )
{ {
zoomFov = (float)cg.predictedPlayerState.zoomFov; zoomFov = (float)weaponData[cg.predictedPlayerState.weapon].zoom[cg.predictedPlayerState.zoomFov].fov;
if (!cg.predictedPlayerState.pm_flags & PMF_ZOOM_LOCKED ) if (!cg.predictedPlayerState.pm_flags & PMF_ZOOM_LOCKED )
{ {
@ -885,6 +884,8 @@ static int CG_CalcFov( void ) {
} }
else else
{ {
zoomFov = (float)weaponData[cg.predictedPlayerState.weapon].zoom[cg.predictedPlayerState.zoomFov].fov;
f = ( cg.time - cg.predictedPlayerState.zoomTime ) / ZOOM_OUT_TIME; f = ( cg.time - cg.predictedPlayerState.zoomTime ) / ZOOM_OUT_TIME;
if ( f > 1.0 ) if ( f > 1.0 )
{ {
@ -892,7 +893,7 @@ static int CG_CalcFov( void ) {
} }
else else
{ {
fov_x = cg.predictedPlayerState.zoomFov + f * ( fov_x - cg.predictedPlayerState.zoomFov ); fov_x = zoomFov + f * ( fov_x - zoomFov );
} }
} }
} }
@ -1285,7 +1286,14 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demo
} }
else if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) else if ( cg.snap->ps.pm_flags & PMF_FOLLOW )
{ {
cg.renderingThirdPerson = qtrue; if ( cg.snap->ps.pm_flags & PMF_FOLLOWFIRST )
{
cg.renderingThirdPerson = qfalse;
}
else
{
cg.renderingThirdPerson = qtrue;
}
} }
else else
{ {

View file

@ -382,6 +382,7 @@ void CG_UpdateViewWeaponSurfaces ( playerState_t* ps )
break; break;
case WP_M1911A1_PISTOL: case WP_M1911A1_PISTOL:
case WP_SILVER_TALON:
case WP_USSOCOM_PISTOL: case WP_USSOCOM_PISTOL:
{ {
int forward; int forward;
@ -1000,7 +1001,7 @@ void CG_PredictedBullet ( centity_t* cent, attackType_t attack )
ent = &cent->currentState; ent = &cent->currentState;
// Dont bother if antilag is turned off or its a projectile weapon // Dont bother if antilag is turned off or its a projectile weapon
if ( cg_antiLag.integer < 1 || !cg_impactPrediction.integer || (weaponData[ent->weapon].attack[attack].weaponFlags & PROJECTILE_FIRE)) if ( cg_antiLag.integer < 1 || cg_synchronousClients.integer || !cg_impactPrediction.integer || (weaponData[ent->weapon].attack[attack].weaponFlags & PROJECTILE_FIRE))
{ {
return; return;
} }
@ -1019,12 +1020,7 @@ void CG_PredictedBullet ( centity_t* cent, attackType_t attack )
VectorCopy(cg.predictedPlayerState.viewangles, fireAngs); VectorCopy(cg.predictedPlayerState.viewangles, fireAngs);
if ( cg.predictedPlayerState.pm_flags & PMF_LEANING ) if ( cg.predictedPlayerState.pm_flags & PMF_LEANING )
{ {
vec3_t right; BG_ApplyLeanOffset ( &cg.predictedPlayerState, start );
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]; seed = cg.predictedPlayerState.stats[STAT_SEED];
@ -1778,7 +1774,7 @@ void CG_WeaponCallback ( playerState_t* ps, centity_t* cent, int weapon, int ani
{ {
// Play sound. // Play sound.
// FIXME: randomly select sound?? // FIXME: randomly select sound??
trap_S_StartSound(NULL,ent->number,CHAN_WEAPON,weaponInfo->otherWeaponSounds[i][0], -1, -1); trap_S_StartSound(NULL,ent->number,CHAN_AUTO,weaponInfo->otherWeaponSounds[i][0], -1, -1);
break; break;
} }
} }

View file

@ -4,7 +4,7 @@
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=SoF2cgame - Win32 SH Debug SoF2 CFG=SoF2cgame - Win32 Release SoF2
!MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run !MESSAGE use the Export Makefile command and run
!MESSAGE !MESSAGE
@ -13,19 +13,16 @@ CFG=SoF2cgame - Win32 SH Debug SoF2
!MESSAGE You can specify a configuration when running NMAKE !MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "sof2_cgame.mak" CFG="SoF2cgame - Win32 SH Debug SoF2" !MESSAGE NMAKE /f "sof2_cgame.mak" CFG="SoF2cgame - Win32 Release SoF2"
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !MESSAGE
!MESSAGE "SoF2cgame - Win32 Release SoF2" (based on "Win32 (x86) Dynamic-Link Library") !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 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "SoF2cgame - Win32 SH Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE !MESSAGE
# Begin Project # Begin Project
# PROP AllowPerConfigDependencies 0 # PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe CPP=cl.exe
MTL=midl.exe MTL=midl.exe
RSC=rc.exe RSC=rc.exe
@ -88,562 +85,152 @@ LINK32=link.exe
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x30000000" /subsystem:windows /dll /map:"..\Debug\sof2mp_cgamex86.map" /debug /machine:I386 /def:".\SoF2_cgame.def" /out:"..\Debug\sof2mp_cgamex86.dll" # 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 # 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 !ENDIF
# Begin Target # Begin Target
# Name "SoF2cgame - Win32 Release SoF2" # Name "SoF2cgame - Win32 Release SoF2"
# Name "SoF2cgame - Win32 Debug SoF2" # Name "SoF2cgame - Win32 Debug SoF2"
# Name "SoF2cgame - Win32 SH Debug SoF2"
# Begin Group "Source Files" # Begin Group "Source Files"
# PROP Default_Filter "c" # PROP Default_Filter "c"
# Begin Source File # Begin Source File
SOURCE=..\game\bg_gametype.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=..\game\bg_lib.c SOURCE=..\game\bg_lib.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
# PROP BASE Exclude_From_Build 1 # PROP BASE Exclude_From_Build 1
# PROP 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=..\game\bg_misc.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=..\game\bg_player.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=..\game\bg_pmove.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=..\game\bg_slidemove.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=..\game\bg_weapons.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_consolecmds.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_draw.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_drawtools.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_effects.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_ents.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_event.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_gametype.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_gore.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_info.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_light.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_localents.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_main.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_miscents.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_newDraw.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_players.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_playerstate.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_predict.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_scoreboard.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_servercmds.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_snapshot.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_syscalls.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_view.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_weaponinit.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_weapons.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=..\game\q_math.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=..\game\q_shared.c 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 # End Source File
# Begin Source File # Begin Source File
SOURCE=..\ui\ui_shared.c 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 Source File
# End Group # End Group
# Begin Group "Header Files" # Begin Group "Header Files"
@ -679,10 +266,18 @@ SOURCE=.\cg_public.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\cg_was.h
# End Source File
# Begin Source File
SOURCE=..\qcommon\disablewarnings.h SOURCE=..\qcommon\disablewarnings.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\fx_local.h
# End Source File
# Begin Source File
SOURCE=..\ghoul2\G2.h SOURCE=..\ghoul2\G2.h
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -748,11 +343,6 @@ SOURCE=.\SoF2_cgame.def
# PROP Exclude_From_Build 1 # PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
!ENDIF !ENDIF
# End Source File # End Source File

View file

@ -726,6 +726,7 @@ int BotAISetupClient(int client, struct bot_settings_s *settings, qboolean resta
bs->botWeaponWeights[WP_NONE] = 0; bs->botWeaponWeights[WP_NONE] = 0;
bs->botWeaponWeights[WP_KNIFE] = 1; bs->botWeaponWeights[WP_KNIFE] = 1;
bs->botWeaponWeights[WP_M1911A1_PISTOL] = 3; bs->botWeaponWeights[WP_M1911A1_PISTOL] = 3;
bs->botWeaponWeights[WP_SILVER_TALON] = 4;
bs->botWeaponWeights[WP_USSOCOM_PISTOL] = 2; bs->botWeaponWeights[WP_USSOCOM_PISTOL] = 2;
bs->botWeaponWeights[WP_M4_ASSAULT_RIFLE] = 10; bs->botWeaponWeights[WP_M4_ASSAULT_RIFLE] = 10;
bs->botWeaponWeights[WP_AK74_ASSAULT_RIFLE] = 9; bs->botWeaponWeights[WP_AK74_ASSAULT_RIFLE] = 9;
@ -742,6 +743,7 @@ int BotAISetupClient(int client, struct bot_settings_s *settings, qboolean resta
bs->botWeaponWeights[WP_ANM14_GRENADE] = 2; bs->botWeaponWeights[WP_ANM14_GRENADE] = 2;
bs->botWeaponWeights[WP_M15_GRENADE] = 2; bs->botWeaponWeights[WP_M15_GRENADE] = 2;
bs->botWeaponWeights[WP_MP5] = 7; bs->botWeaponWeights[WP_MP5] = 7;
bs->botWeaponWeights[WP_SIG551] = 7;
BotUtilizePersonality(bs); BotUtilizePersonality(bs);
@ -3489,6 +3491,7 @@ float BotWeaponCanLead(bot_state_t *bs)
// no leading needed for any bullet weapons // no leading needed for any bullet weapons
case WP_M1911A1_PISTOL: case WP_M1911A1_PISTOL:
case WP_SILVER_TALON:
case WP_USSOCOM_PISTOL: case WP_USSOCOM_PISTOL:
case WP_M4_ASSAULT_RIFLE: case WP_M4_ASSAULT_RIFLE:
case WP_AK74_ASSAULT_RIFLE: case WP_AK74_ASSAULT_RIFLE:
@ -3496,6 +3499,7 @@ float BotWeaponCanLead(bot_state_t *bs)
case WP_MICRO_UZI_SUBMACHINEGUN: case WP_MICRO_UZI_SUBMACHINEGUN:
case WP_M3A1_SUBMACHINEGUN: case WP_M3A1_SUBMACHINEGUN:
case WP_MP5: case WP_MP5:
case WP_SIG551:
case WP_MSG90A1: case WP_MSG90A1:
case WP_USAS_12_SHOTGUN: case WP_USAS_12_SHOTGUN:
case WP_M590_SHOTGUN: case WP_M590_SHOTGUN:

View file

@ -1353,6 +1353,7 @@ float botGlobalNavWeaponWeights[WP_NUM_WEAPONS] =
6,//WP_M15_GRENADE, 6,//WP_M15_GRENADE,
6,//WP_MP5 6,//WP_MP5
6,//WP_SIG551
}; };
int GetNearestVisibleWPToItem(vec3_t org, int ignore) int GetNearestVisibleWPToItem(vec3_t org, int ignore)

View file

@ -223,6 +223,27 @@ Pistol, uses 45 rounds
OUTFITTING_GROUP_PISTOL, 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) /*QUAKED pickup_weapon_microuzi (0 .6 .6) (-15 -15 -15) (15 15 15)
Sub-Machinegun, uses 9mm rounds Sub-Machinegun, uses 9mm rounds
*/ */
@ -265,6 +286,27 @@ Sub-Machinegun, uses 45 rounds
OUTFITTING_GROUP_SECONDARY, 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) /*QUAKED pickup_weapon_USAS_12 (0 .6 .6) (-15 -15 -15) (15 15 15)
Shotgun, uses 12-gauge rounds Shotgun, uses 12-gauge rounds
ammo ---------- amount of ammo (defaults to 10) ammo ---------- amount of ammo (defaults to 10)
@ -371,6 +413,27 @@ Assault Rifle, uses 5.56 rounds
OUTFITTING_GROUP_PRIMARY, 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) /*QUAKED pickup_weapon_M60 (0 .6 .6) (-15 -15 -15) (15 15 15)
Machinegun, uses 7.62 rounds Machinegun, uses 7.62 rounds
*/ */
@ -518,27 +581,6 @@ White Phosphorus Grenade
OUTFITTING_GROUP_GRENADE, OUTFITTING_GROUP_GRENADE,
}, },
/*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,
},
// //
// AMMO ITEMS // AMMO ITEMS
// //

View file

@ -36,11 +36,11 @@ char bg_availableOutfitting[WP_NUM_WEAPONS] = {-1};
int bg_outfittingGroups[OUTFITTING_GROUP_MAX][MAX_OUTFITTING_GROUPITEM] = int bg_outfittingGroups[OUTFITTING_GROUP_MAX][MAX_OUTFITTING_GROUPITEM] =
{ {
{ MODELINDEX_WEAPON_AK74, MODELINDEX_WEAPON_M4, MODELINDEX_WEAPON_USAS12, MODELINDEX_WEAPON_MSG90A1, MODELINDEX_WEAPON_M60, MODELINDEX_WEAPON_MP5, MODELINDEX_WEAPON_RPG7, MODELINDEX_WEAPON_MM1, -1, -1 }, { MODELINDEX_WEAPON_AK74, MODELINDEX_WEAPON_M4, MODELINDEX_WEAPON_SIG551, MODELINDEX_WEAPON_USAS12, MODELINDEX_WEAPON_MSG90A1, MODELINDEX_WEAPON_M60, MODELINDEX_WEAPON_MP5, MODELINDEX_WEAPON_RPG7, MODELINDEX_WEAPON_MM1, -1, -1, -1 },
{ MODELINDEX_WEAPON_M590, MODELINDEX_WEAPON_MICROUZI, MODELINDEX_WEAPON_M3A1, -1, -1, -1, -1, -1, -1, - 1 }, { MODELINDEX_WEAPON_M590, MODELINDEX_WEAPON_MICROUZI, MODELINDEX_WEAPON_M3A1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
{ MODELINDEX_WEAPON_M19, MODELINDEX_WEAPON_SOCOM, -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 }, { 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 }, { MODELINDEX_ARMOR, MODELINDEX_NIGHTVISION, MODELINDEX_THERMAL, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
}; };
/* /*
@ -1743,4 +1743,21 @@ int BG_ParseOutfittingTemplates ( qboolean force )
return bg_outfittingCount; 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 );
}

View file

@ -1197,7 +1197,7 @@ static void PM_CrashLand( int impactMaterial, vec3_t impactNormal )
pm->ps->velocity[0] *= 0.25f; pm->ps->velocity[0] *= 0.25f;
pm->ps->velocity[1] *= 0.25f; pm->ps->velocity[1] *= 0.25f;
pm->ps->pm_time = 500; pm->ps->pm_time = 750;
} }
// create a local entity event to play the sound // create a local entity event to play the sound
@ -2382,7 +2382,7 @@ static void PM_FinishWeaponChange( void )
PM_HandleWeaponAction(WACT_READY); PM_HandleWeaponAction(WACT_READY);
pm->ps->weaponTime = min(500,pm->ps->weaponTime); pm->ps->weaponTime = min(150,pm->ps->weaponTime);
PM_StartTorsoAnim( pm->ps, weaponData[pm->ps->weapon].animRaise, pm->ps->weaponAnimTime ); PM_StartTorsoAnim( pm->ps, weaponData[pm->ps->weapon].animRaise, pm->ps->weaponAnimTime );
} }
@ -2500,6 +2500,24 @@ int PM_GetAttackButtons(void)
pm->ps->pm_debounce &= ~PMD_FIREMODE; 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. // Handle firebutton in varous firemodes.
switch( pm->ps->firemode[pm->ps->weapon] ) switch( pm->ps->firemode[pm->ps->weapon] )
{ {
@ -2507,26 +2525,16 @@ int PM_GetAttackButtons(void)
break; break;
case WP_FIREMODE_BURST: case WP_FIREMODE_BURST:
// Debounce attack button and disable other buttons during burst fire. // Debounce attack button and disable other buttons during burst fire.
if(buttons&BUTTON_ATTACK) if(buttons&BUTTON_ATTACK)
{ {
if( !(pm->ps->pm_debounce & PMD_ATTACK)) if(!pm->ps->weaponFireBurstCount)
{ {
pm->ps->pm_debounce |= PMD_ATTACK; pm->ps->weaponFireBurstCount=3;
if(!pm->ps->weaponFireBurstCount)
{
pm->ps->weaponFireBurstCount=3;
}
}
else
{
buttons &= ~BUTTON_ATTACK;
} }
} }
else
{
pm->ps->pm_debounce &= ~PMD_ATTACK;
}
if(pm->ps->weaponFireBurstCount) if(pm->ps->weaponFireBurstCount)
{ {
buttons|=BUTTON_ATTACK; buttons|=BUTTON_ATTACK;
@ -2539,23 +2547,6 @@ int PM_GetAttackButtons(void)
break; break;
case WP_FIREMODE_SINGLE: 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; break;
} }
@ -2598,15 +2589,19 @@ static void PM_Weapon_AddInaccuracy( attackType_t attack )
// Zoomed sniper weapons don't add innacuracy if ont hte ground // Zoomed sniper weapons don't add innacuracy if ont hte ground
if( (pm->ps->pm_flags & PMF_ZOOMED) && pml.groundPlane ) if( (pm->ps->pm_flags & PMF_ZOOMED) && pml.groundPlane )
{ {
return; pm->ps->inaccuracy += weaponData[pm->ps->weapon].attack[attack].zoomInaccuracy;
}
else
{
pm->ps->inaccuracy += weaponData[pm->ps->weapon].attack[attack].inaccuracy;
} }
pm->ps->inaccuracy += weaponData[pm->ps->weapon].attack[attack].inaccuracy;
pm->ps->inaccuracyTime = RECOVER_TIME; pm->ps->inaccuracyTime = RECOVER_TIME;
if ( pm->ps->inaccuracy > weaponData[pm->ps->weapon].attack[attack].maxInaccuracy ) if ( pm->ps->inaccuracy > weaponData[pm->ps->weapon].attack[attack].maxInaccuracy )
{
pm->ps->inaccuracy = weaponData[pm->ps->weapon].attack[attack].maxInaccuracy; pm->ps->inaccuracy = weaponData[pm->ps->weapon].attack[attack].maxInaccuracy;
}
} }
/* /*
@ -2948,11 +2943,6 @@ static void PM_Weapon( void )
if( pm->ps->weaponstate == WEAPON_ZOOMIN ) if( pm->ps->weaponstate == WEAPON_ZOOMIN )
{ {
// The zoomfov may still be remembered from a reload while zooming // 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_ZOOMED;
pm->ps->pm_flags |= PMF_ZOOM_LOCKED; pm->ps->pm_flags |= PMF_ZOOM_LOCKED;
pm->ps->pm_flags &= ~PMF_ZOOM_REZOOM; pm->ps->pm_flags &= ~PMF_ZOOM_REZOOM;
@ -3026,6 +3016,7 @@ static void PM_Weapon( void )
pm->ps->weaponstate=WEAPON_READY; pm->ps->weaponstate=WEAPON_READY;
return; return;
} }
break;
default: default:
break; break;
} }
@ -3116,7 +3107,7 @@ static void PM_Weapon( void )
} }
// Handle zooming in/out for sniper rifle. // Handle zooming in/out for sniper rifle.
if(pm->ps->weapon==WP_MSG90A1) if( weaponData[pm->ps->weapon].zoom[0].fov )
{ {
if( (attackButtons&BUTTON_ALT_ATTACK) || (pm->ps->pm_flags & PMF_ZOOM_REZOOM) ) if( (attackButtons&BUTTON_ALT_ATTACK) || (pm->ps->pm_flags & PMF_ZOOM_REZOOM) )
{ {
@ -3134,22 +3125,20 @@ static void PM_Weapon( void )
{ {
if(pm->cmd.buttons&BUTTON_ZOOMIN) if(pm->cmd.buttons&BUTTON_ZOOMIN)
{ {
pm->ps->zoomFov = pm->ps->zoomFov >> 1; if ( pm->ps->zoomFov + 1 < ZOOMLEVEL_MAX && weaponData[pm->ps->weapon].zoom[pm->ps->zoomFov+1].fov )
if ( pm->ps->zoomFov < 5) {
{ pm->ps->zoomFov++;
pm->ps->zoomFov = 5; pm->ps->weaponTime=175;
} }
pm->ps->weaponTime=175;
return; return;
} }
else if(pm->cmd.buttons&BUTTON_ZOOMOUT) else if(pm->cmd.buttons&BUTTON_ZOOMOUT)
{ {
pm->ps->zoomFov = pm->ps->zoomFov << 1; if ( pm->ps->zoomFov > 0 )
if(pm->ps->zoomFov > 20 )
{ {
pm->ps->zoomFov = 20; pm->ps->zoomFov--;
pm->ps->weaponTime=175;
} }
pm->ps->weaponTime=175;
return; return;
} }
} }
@ -3263,6 +3252,8 @@ static void PM_Weapon( void )
return; return;
} }
pm->ps->pm_debounce |= PMD_ATTACK;
// Decrease the ammo // Decrease the ammo
(*ammoSource) -= attackData->fireAmount; (*ammoSource) -= attackData->fireAmount;
@ -3408,10 +3399,9 @@ static void PM_CheckLean( void )
// check for collision // check for collision
VectorCopy( pm->ps->origin, start ); VectorCopy( pm->ps->origin, start );
start[2] += pm->ps->viewheight;
AngleVectors( pm->ps->viewangles, NULL, right, NULL ); AngleVectors( pm->ps->viewangles, NULL, right, NULL );
VectorSet( mins, -6, -6, -8 ); VectorSet( mins, -6, -6, -20 );
VectorSet( maxs, 6, 6, 8 ); VectorSet( maxs, 6, 6, 20 );
// since we're moving the camera over // since we're moving the camera over
// check that move // check that move
@ -3877,13 +3867,8 @@ void PM_UpdatePVSOrigin ( pmove_t *pmove )
// Set a pm flag for leaning and calculate the view origin for the lean // Set a pm flag for leaning and calculate the view origin for the lean
if ( pm->ps->leanTime - LEAN_TIME != 0 ) if ( pm->ps->leanTime - LEAN_TIME != 0 )
{ {
vec3_t right; VectorCopy ( pm->ps->origin, pm->ps->pvsOrigin );
float leanOffset; BG_ApplyLeanOffset ( pm->ps, pm->ps->pvsOrigin );
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 else
{ {

View file

@ -12,10 +12,36 @@
#include "../../ui/menudef.h" #include "../../ui/menudef.h"
#include "inv.h" #include "inv.h"
//#define GAME_VERSION "sof2mp-0.01" sent on 11/26/2001
//#define GAME_VERSION "sof2mp-0.02" sent on 12/10/2001
//#define GAME_VERSION "sof2mp-0.03" sent on 12/16/2001
//#define GAME_VERSION "sof2mp-0.081" sent on 1/15/2002
//#define GAME_VERSION "sof2mp-0.09" sent on 1/24/2002
//#define GAME_VERSION "sof2mp-0.10" sent on 1/31/2002
//#define GAME_VERSION "sof2mp-0.11" sent on 2/7/2002
//#define GAME_VERSION "sof2mp-0.12" sent on 2/14/2002
//#define GAME_VERSION "sof2mp-0.13" sent on 2/21/2002
//#define GAME_VERSION "sof2mp-0.13b" public beta #1 on 3/1/3002
//#define GAME_VERSION "sof2mp-0.14" sent on 3/4/2002
//#define GAME_VERSION "sof2mp-0.15" sent on 3/11/2002
//#define GAME_VERSION "sof2mp-0.15b" public beta #2 on 3/13/2002
//#define GAME_VERSION "sof2mp-0.16" sent on 3/18/2002
//#define GAME_VERSION "sof2mp-0.16b" public beta #3 on 3/20/2002
//#define GAME_VERSION "sof2mp-0.17" sent on 3/24/2002
//#define GAME_VERSION "sof2mp-1.01t" sent on 3/28/2002
//#define GAME_VERSION "sof2mp-0.18" sent on 4/1/2002 - April Fools!
//#define GAME_VERSION "sof2mp-1.02t" sent on 4/5/2002
//#define GAME_VERSION "sof2mp-0.19" sent on 4/8/2002
//#define GAME_VERSION "sof2mp-0.20" sent on 4/15/2002 - Tax Day!
//#define GAME_VERSION "sof2mp-0.21" sent on 4/22/2002
//#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 #ifdef GERMAN_BUILD
#define GAME_VERSION "sof2mp-mod-1.01g" // #define GAME_VERSION "sof2mp-1.00g"
#define GAME_VERSION "sof2mp-1.02g"
#else #else
#define GAME_VERSION "sof2mp-mod-1.01" // #define GAME_VERSION "sof2mp-1.00"
#define GAME_VERSION "sof2mp-1.02"
#endif #endif
#define DEFAULT_GRAVITY 800 #define DEFAULT_GRAVITY 800
@ -36,12 +62,12 @@
#define SCORE_NOT_PRESENT -9999 // for the CS_SCORES[12] when only one player is present #define SCORE_NOT_PRESENT -9999 // for the CS_SCORES[12] when only one player is present
#define DEFAULT_PLAYER_Z_MAX 43 #define DEFAULT_PLAYER_Z_MAX 43
#define CROUCH_PLAYER_Z_MAX 26 #define CROUCH_PLAYER_Z_MAX 18
#define PRONE_PLAYER_Z_MAX -12 #define PRONE_PLAYER_Z_MAX -12
#define DEAD_PLAYER_Z_MAX -30 #define DEAD_PLAYER_Z_MAX -30
#define DUCK_ACCURACY_MODIFIER 0.75f #define DUCK_ACCURACY_MODIFIER 0.75f
#define JUMP_ACCURACY_MODIFIER 1.5f #define JUMP_ACCURACY_MODIFIER 2.0f
#define MINS_Z -46 #define MINS_Z -46
@ -325,6 +351,7 @@ typedef struct ladder_s
// changes so a restart of the same anim can be detected // 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 ANIM_TOGGLEBIT 2048 // Note that there are 12 bits (max 4095) for animations.
#define ITEM_AUTOSWITCHBIT (1<<31) #define ITEM_AUTOSWITCHBIT (1<<31)
#define ITEM_QUIETPICKUP (1<<30)
typedef enum typedef enum
{ {
@ -382,6 +409,7 @@ typedef enum {
#define PMF_AUTORELOAD 0x00400000 // autoreloading enabled #define PMF_AUTORELOAD 0x00400000 // autoreloading enabled
#define PMF_SIAMESETWINS 0x00800000 #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_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) #define PMF_ZOOM_FLAGS (PMF_ZOOMED|PMF_ZOOM_LOCKED|PMF_ZOOM_REZOOM|PMF_ZOOM_DEFER_RELOAD)
@ -503,6 +531,9 @@ typedef enum
PERS_RED_SCORE, // Blue team score PERS_RED_SCORE, // Blue team score
PERS_BLUE_SCORE, // red 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; } persEnum_t;
@ -591,6 +622,7 @@ typedef enum
EV_WATER_CLEAR, EV_WATER_CLEAR,
EV_ITEM_PICKUP, // normal item pickups are predictable EV_ITEM_PICKUP, // normal item pickups are predictable
EV_ITEM_PICKUP_QUIET, // quiet pickup
EV_NOAMMO, EV_NOAMMO,
EV_CHANGE_WEAPON, EV_CHANGE_WEAPON,
@ -1018,7 +1050,7 @@ typedef struct SSkinTemplate
#define MAX_MODEL_SOUNDS 8 #define MAX_MODEL_SOUNDS 8
#define MAX_IDENTITIES 256 #define MAX_IDENTITIES 256
#define MAX_OUTFITTINGS 64 #define MAX_OUTFITTINGS 64
#define MAX_OUTFITTING_GROUPITEM 10 #define MAX_OUTFITTING_GROUPITEM 12
typedef struct SModelSounds typedef struct SModelSounds
{ {
@ -1064,7 +1096,7 @@ extern TIdentity bg_identities[];
extern int bg_identityCount; extern int bg_identityCount;
extern goutfitting_t bg_outfittings[]; extern goutfitting_t bg_outfittings[];
extern int bg_outfittingCount; extern int bg_outfittingCount;
extern int bg_outfittingGroups[][10]; extern int bg_outfittingGroups[][MAX_OUTFITTING_GROUPITEM];
extern char *bg_weaponNames[WP_NUM_WEAPONS]; extern char *bg_weaponNames[WP_NUM_WEAPONS];
extern stringID_table_t bg_animTable [MAX_ANIMATIONS+1]; extern stringID_table_t bg_animTable [MAX_ANIMATIONS+1];
@ -1081,6 +1113,7 @@ void BG_DecompressOutfitting ( const char* compressed, goutfitting_t* outf
void BG_CompressOutfitting ( goutfitting_t* outfitting, char* compressed, int size ); void BG_CompressOutfitting ( goutfitting_t* outfitting, char* compressed, int size );
int BG_ParseOutfittingTemplates ( qboolean force ); int BG_ParseOutfittingTemplates ( qboolean force );
int BG_FindOutfitting ( goutfitting_t* outfitting); int BG_FindOutfitting ( goutfitting_t* outfitting);
void BG_ApplyLeanOffset ( playerState_t* ps, vec3_t origin );
/******************************************************************************* /*******************************************************************************
* *

View file

@ -14,6 +14,7 @@ char *bg_weaponNames[WP_NUM_WEAPONS] =
"Knife", // WP_KNIFE, "Knife", // WP_KNIFE,
"M1911A1", // WP_M1911A1_PISTOL, "M1911A1", // WP_M1911A1_PISTOL,
"US SOCOM", // WP_US_SOCOM_PISTOL, "US SOCOM", // WP_US_SOCOM_PISTOL,
"Silver Talon", // WP_SILVER_TALON,
"M590", // WP_M590_SHOTGUN, "M590", // WP_M590_SHOTGUN,
"Micro Uzi", // WP_MICRO_UZI_SUBMACHINEGUN, "Micro Uzi", // WP_MICRO_UZI_SUBMACHINEGUN,
"M3A1", // WP_M3A1_SUBMACHINEGUN, "M3A1", // WP_M3A1_SUBMACHINEGUN,
@ -21,6 +22,7 @@ char *bg_weaponNames[WP_NUM_WEAPONS] =
"USAS-12", // WP_USAS_12_SHOTGUN, "USAS-12", // WP_USAS_12_SHOTGUN,
"M4", // WP_M4_ASSAULT_RIFLE, "M4", // WP_M4_ASSAULT_RIFLE,
"AK74", // WP_AK74_ASSAULT_RIFLE, "AK74", // WP_AK74_ASSAULT_RIFLE,
"Sig 551", // WP_SIG551
"MSG90A1", // WP_MSG90A1_SNIPER_RIFLE, "MSG90A1", // WP_MSG90A1_SNIPER_RIFLE,
"M60", // WP_M60_MACHINEGUN, "M60", // WP_M60_MACHINEGUN,
"MM1", // WP_MM1_GRENADE_LAUNCHER, "MM1", // WP_MM1_GRENADE_LAUNCHER,
@ -156,6 +158,38 @@ static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void
return qtrue; 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 // Assign a melee attribute if there is one
trap_GPG_FindPairValue(attacksub, "mp_melee||melee", "none", tmpStr ); trap_GPG_FindPairValue(attacksub, "mp_melee||melee", "none", tmpStr );
if ( Q_stricmp ( tmpStr, "none" ) ) if ( Q_stricmp ( tmpStr, "none" ) )
@ -219,6 +253,8 @@ static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void
attack->damage = atoi(tmpStr); attack->damage = atoi(tmpStr);
trap_GPG_FindPairValue(attacksub, "mp_inaccuracy||inaccuracy", "0", tmpStr); trap_GPG_FindPairValue(attacksub, "mp_inaccuracy||inaccuracy", "0", tmpStr);
attack->inaccuracy = (int)(atof(tmpStr)*1000.0f); 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); trap_GPG_FindPairValue(attacksub, "mp_maxInaccuracy||maxInaccuracy", "0", tmpStr);
attack->maxInaccuracy = (int)(atof(tmpStr)*1000.0f); attack->maxInaccuracy = (int)(atof(tmpStr)*1000.0f);
trap_GPG_FindPairValue(attacksub, "mp_gore||gore", "YES", tmpStr); trap_GPG_FindPairValue(attacksub, "mp_gore||gore", "YES", tmpStr);
@ -1196,12 +1232,12 @@ void BG_CalculateBulletEndpoint ( vec3_t muzzlePoint, vec3_t fireAngs, float ina
float f1; float f1;
float f2; float f2;
f1 = (float)(Q_rand ( seed ) % 15000) / 15000.0f; f1 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
f2 = (float)(Q_rand ( seed ) % 15000) / 15000.0f; f2 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
fGaussianX = (f1-0.5f) + (f2-0.5f); fGaussianX = (f1-0.5f) + (f2-0.5f);
f1 = (float)(Q_rand ( seed ) % 15000) / 15000.0f; f1 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
f2 = (float)(Q_rand ( seed ) % 15000) / 15000.0f; f2 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
fGaussianY = (f1-0.5f) + (f2-0.5f); fGaussianY = (f1-0.5f) + (f2-0.5f);
fGaussian = fGaussianX * fGaussianX + fGaussianY * fGaussianY; fGaussian = fGaussianX * fGaussianX + fGaussianY * fGaussianY;

View file

@ -16,6 +16,7 @@ typedef enum
// Pistols // Pistols
MOD_M1911A1_PISTOL, MOD_M1911A1_PISTOL,
MOD_USSOCOM_PISTOL, MOD_USSOCOM_PISTOL,
MOD_SILVER_TALON,
// Secondarys // Secondarys
MOD_M590_SHOTGUN, MOD_M590_SHOTGUN,
@ -27,6 +28,8 @@ typedef enum
MOD_USAS_12_SHOTGUN, MOD_USAS_12_SHOTGUN,
MOD_M4_ASSAULT_RIFLE, MOD_M4_ASSAULT_RIFLE,
MOD_AK74_ASSAULT_RIFLE, MOD_AK74_ASSAULT_RIFLE,
MOD_SIG551,
MOD_MSG90A1_SNIPER_RIFLE, MOD_MSG90A1_SNIPER_RIFLE,
MOD_M60_MACHINEGUN, MOD_M60_MACHINEGUN,
MOD_MM1_GRENADE_LAUNCHER, MOD_MM1_GRENADE_LAUNCHER,
@ -60,6 +63,7 @@ typedef enum
// Pistols // Pistols
WP_M1911A1_PISTOL, WP_M1911A1_PISTOL,
WP_USSOCOM_PISTOL, WP_USSOCOM_PISTOL,
WP_SILVER_TALON,
// Secondarys // Secondarys
WP_M590_SHOTGUN, WP_M590_SHOTGUN,
@ -71,6 +75,8 @@ typedef enum
WP_USAS_12_SHOTGUN, WP_USAS_12_SHOTGUN,
WP_M4_ASSAULT_RIFLE, WP_M4_ASSAULT_RIFLE,
WP_AK74_ASSAULT_RIFLE, WP_AK74_ASSAULT_RIFLE,
WP_SIG551,
WP_MSG90A1, WP_MSG90A1,
WP_M60_MACHINEGUN, WP_M60_MACHINEGUN,
WP_MM1_GRENADE_LAUNCHER, WP_MM1_GRENADE_LAUNCHER,
@ -140,6 +146,16 @@ typedef enum
} ECategory; } 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 typedef struct attackData_s
{ {
char name[MAX_QPATH]; char name[MAX_QPATH];
@ -160,6 +176,7 @@ typedef struct attackData_s
int fireFromClip; // 0 = fire from approp. ammo pool, 1 = fire from clip int fireFromClip; // 0 = fire from approp. ammo pool, 1 = fire from clip
int damage; // how much damage is done per hit int damage; // how much damage is done per hit
float inaccuracy; // how inaccurate is weapon float inaccuracy; // how inaccurate is weapon
float zoomInaccuracy; // how inaccurate is the weapon when zoomed
float maxInaccuracy; // maximum lvl of inaccuracy float maxInaccuracy; // maximum lvl of inaccuracy
int pellets; // how many individual 'bullets' are shot with one trigger pull? int pellets; // how many individual 'bullets' are shot with one trigger pull?
int weaponFlags; // which fire modes are available, projectiles timed or impact, .etc int weaponFlags; // which fire modes are available, projectiles timed or impact, .etc
@ -207,6 +224,7 @@ typedef struct weaponData_s
attackData_t attack[ATTACK_MAX]; attackData_t attack[ATTACK_MAX];
zoomData_t zoom[ZOOMLEVEL_MAX];
} weaponData_t; } weaponData_t;

View file

@ -499,6 +499,9 @@ void G_UpdatePlayerStateScores ( gentity_t* ent )
{ {
ent->client->ps.persistant[PERS_RED_SCORE] = level.teamScores[TEAM_RED]; ent->client->ps.persistant[PERS_RED_SCORE] = level.teamScores[TEAM_RED];
ent->client->ps.persistant[PERS_BLUE_SCORE] = level.teamScores[TEAM_BLUE]; 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 else
{ {
@ -566,6 +569,11 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd )
// attack button cycles through spectators // attack button cycles through spectators
if ( client->sess.spectatorState != SPECTATOR_FOLLOW && g_forceFollow.integer ) if ( client->sess.spectatorState != SPECTATOR_FOLLOW && g_forceFollow.integer )
{ {
if ( g_forceFollow.integer > 1 )
{
client->sess.spectatorFirstPerson = qtrue;
}
Cmd_FollowCycle_f( ent, 1 ); Cmd_FollowCycle_f( ent, 1 );
} }
if ( ( client->buttons & BUTTON_ATTACK ) && ! ( client->oldbuttons & BUTTON_ATTACK ) ) if ( ( client->buttons & BUTTON_ATTACK ) && ! ( client->oldbuttons & BUTTON_ATTACK ) )
@ -575,11 +583,33 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd )
else if ( ( client->buttons & BUTTON_ALT_ATTACK ) && ! ( client->oldbuttons & BUTTON_ALT_ATTACK ) ) else if ( ( client->buttons & BUTTON_ALT_ATTACK ) && ! ( client->oldbuttons & BUTTON_ALT_ATTACK ) )
{ {
Cmd_FollowCycle_f( ent, -1 ); Cmd_FollowCycle_f( ent, -1 );
} }
else if ( !g_forceFollow.integer && ucmd->upmove > 0 && (client->ps.pm_flags & PMF_FOLLOW) ) else if ( !g_forceFollow.integer && ucmd->upmove > 0 && (client->ps.pm_flags & PMF_FOLLOW) )
{ {
G_StopFollowing( ent ); 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;
}
}
} }
/* /*
@ -1101,6 +1131,15 @@ void ClientThink_real( gentity_t *ent )
// Update the client animation info // Update the client animation info
G_UpdateClientAnimations ( ent ); 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 // link entity now, after any personal teleporters have been used
trap_LinkEntity (ent); trap_LinkEntity (ent);
@ -1358,6 +1397,10 @@ void SpectatorClientEndFrame( gentity_t *ent )
ent->client->ps = cl->ps; ent->client->ps = cl->ps;
ent->client->ps.pm_flags |= PMF_FOLLOW; 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.eFlags = flags;
ent->client->ps.persistant[PERS_SPAWN_COUNT] = count; ent->client->ps.persistant[PERS_SPAWN_COUNT] = count;
ent->client->ps.persistant[PERS_SCORE] = score; ent->client->ps.persistant[PERS_SCORE] = score;

View file

@ -232,15 +232,17 @@ void G_UndoAntiLag ( void )
continue; continue;
} }
if ( other->r.svFlags & SVF_DOUBLED_BBOX ) if ( other->r.svFlags & SVF_INFLATED_BBOX )
{ {
// Put the hitbox back the way it was // Put the hitbox back the way it was
other->r.maxs[0] = other->client->maxSave[0]; other->r.maxs[0] = other->client->maxSave[0];
other->r.maxs[1] = other->client->maxSave[1]; other->r.maxs[1] = other->client->maxSave[1];
other->r.maxs[2] = other->client->maxSave[2];
other->r.mins[0] = other->client->minSave[0]; other->r.mins[0] = other->client->minSave[0];
other->r.mins[1] = other->client->minSave[1]; other->r.mins[1] = other->client->minSave[1];
other->r.svFlags &= (~SVF_DOUBLED_BBOX); other->r.svFlags &= (~SVF_INFLATED_BBOX);
} }
G_UndoClientAntiLag ( other ); G_UndoClientAntiLag ( other );
@ -306,8 +308,15 @@ void G_ApplyAntiLag ( gentity_t* ref, qboolean enlargeHitBox )
{ {
other->client->minSave[0] = other->r.mins[0]; other->client->minSave[0] = other->r.mins[0];
other->client->minSave[1] = other->r.mins[1]; other->client->minSave[1] = other->r.mins[1];
other->client->maxSave[0] = other->r.maxs[0]; other->client->maxSave[0] = other->r.maxs[0];
other->client->maxSave[1] = other->r.maxs[1]; 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 // Adjust the hit box to account for hands and such
// that are sticking out of the normal bounding box // that are sticking out of the normal bounding box
@ -327,7 +336,7 @@ void G_ApplyAntiLag ( gentity_t* ref, qboolean enlargeHitBox )
other->r.mins[1] *= 2.0f; other->r.mins[1] *= 2.0f;
} }
other->r.svFlags |= SVF_DOUBLED_BBOX; other->r.svFlags |= SVF_INFLATED_BBOX;
} }
// Relink the entity into the world // Relink the entity into the world

View file

@ -182,6 +182,23 @@ const char *G_GetArenaInfoByMap( const char *map )
return NULL; 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 G_DoesMapSupportGametype

View file

@ -176,7 +176,9 @@ gspawn_t* G_SelectRandomSpawnPoint ( team_t team )
return tfspawns[ rand() % tfcount ]; return tfspawns[ rand() % tfcount ];
} }
return spawns[ rand() % count ]; i = rand() % count;
return spawns[ i ];
} }
/* /*
@ -1218,12 +1220,16 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot )
gclient_t *client; gclient_t *client;
char userinfo[MAX_INFO_STRING]; char userinfo[MAX_INFO_STRING];
char ip[128]; char ip[128];
char guid[64];
gentity_t *ent; gentity_t *ent;
ent = &g_entities[ clientNum ]; ent = &g_entities[ clientNum ];
trap_GetUserinfo( clientNum, userinfo, sizeof( userinfo ) ); 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 // check to see if they are on the banned IP list
value = Info_ValueForKey (userinfo, "ip"); value = Info_ValueForKey (userinfo, "ip");
Com_sprintf ( ip, sizeof(ip), value ); Com_sprintf ( ip, sizeof(ip), value );
@ -1271,7 +1277,7 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot )
} }
// get and distribute relevent paramters // get and distribute relevent paramters
G_LogPrintf( "ClientConnect: %i - %s\n", clientNum, ip ); G_LogPrintf( "ClientConnect: %i - %s [%s]\n", clientNum, ip, guid );
ClientUserinfoChanged( clientNum ); ClientUserinfoChanged( clientNum );
// don't do the "xxx connected" messages if they were caried over from previous level // don't do the "xxx connected" messages if they were caried over from previous level
@ -1290,6 +1296,7 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot )
CalculateRanks(); CalculateRanks();
// Make sure they are unlinked // Make sure they are unlinked
ent->s.number = clientNum;
trap_UnlinkEntity ( ent ); trap_UnlinkEntity ( ent );
return NULL; return NULL;
@ -1366,7 +1373,7 @@ void ClientBegin( int clientNum )
{ {
// If there are ghosts already then spawn as a ghost because // If there are ghosts already then spawn as a ghost because
// the game is already in progress. // the game is already in progress.
if ( (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) ) if ( !level.warmupTime && (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) )
{ {
G_StartGhosting ( ent ); G_StartGhosting ( ent );
} }
@ -1554,6 +1561,7 @@ void ClientSpawn(gentity_t *ent)
VectorCopy (playerMaxs, ent->r.maxs); VectorCopy (playerMaxs, ent->r.maxs);
client->ps.clientNum = index; client->ps.clientNum = index;
ent->s.number = index;
// Bring back the saved firemodes // Bring back the saved firemodes
memcpy ( client->ps.firemode, client->pers.firemode, sizeof(client->ps.firemode) ); memcpy ( client->ps.firemode, client->pers.firemode, sizeof(client->ps.firemode) );
@ -1566,7 +1574,7 @@ void ClientSpawn(gentity_t *ent)
// Give the client their weapons depending on whether or not pickups are enabled // Give the client their weapons depending on whether or not pickups are enabled
if ( level.pickupsDisabled ) if ( level.pickupsDisabled )
{ {
G_UpdateOutfitting ( ent->s.number ); G_UpdateOutfitting ( index );
// Prevent the client from picking up a whole bunch of stuff // Prevent the client from picking up a whole bunch of stuff
client->ps.pm_flags |= PMF_LIMITED_INVENTORY; client->ps.pm_flags |= PMF_LIMITED_INVENTORY;
@ -1659,6 +1667,10 @@ void ClientSpawn(gentity_t *ent)
client->ps.torsoAnim = -1; client->ps.torsoAnim = -1;
client->ps.legsAnim = LEGS_IDLE; client->ps.legsAnim = LEGS_IDLE;
client->ps.weaponAnimIdChoice = 0;
client->ps.weaponCallbackStep = 0;
client->ps.weaponCallbackTime = 0;
// Not on a ladder // Not on a ladder
client->ps.ladder = -1; client->ps.ladder = -1;
@ -1670,6 +1682,12 @@ void ClientSpawn(gentity_t *ent)
MoveClientToIntermission( 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, // run a client frame to drop exactly to the floor,
// initialize animations and other things // initialize animations and other things
client->ps.commandTime = level.time - 100; client->ps.commandTime = level.time - 100;
@ -1690,12 +1708,6 @@ void ClientSpawn(gentity_t *ent)
// clear entity state values // clear entity state values
BG_PlayerStateToEntityState( &client->ps, &ent->s, qtrue ); 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 // Handle a deferred name change
if ( client->pers.deferredname[0] ) if ( client->pers.deferredname[0] )
{ {
@ -1901,3 +1913,51 @@ gentity_t* G_FindNearbyClient ( vec3_t origin, team_t team, float radius, gentit
return NULL; 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;
}

View file

@ -288,7 +288,7 @@ void Cmd_DropItem_f ( gentity_t* ent )
return; return;
} }
G_DropGametypeItems ( ent ); G_DropGametypeItems ( ent, 3000 );
} }
/* /*
@ -753,6 +753,9 @@ void SetTeam( gentity_t *ent, char *s, const char* identity )
client->sess.spectatorState = specState; client->sess.spectatorState = specState;
client->sess.spectatorClient = specClient; 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. // Always spawn into a ctf game using a respawn timer.
if ( team != TEAM_SPECTATOR && level.gametypeData->respawnType == RT_INTERVAL ) if ( team != TEAM_SPECTATOR && level.gametypeData->respawnType == RT_INTERVAL )
{ {
@ -767,7 +770,7 @@ void SetTeam( gentity_t *ent, char *s, const char* identity )
{ {
// If there are ghosts already then spawn as a ghost because // If there are ghosts already then spawn as a ghost because
// the game is already in progress. // the game is already in progress.
if ( (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) || noOutfittingChange || client->sess.noTeamChange ) if ( !level.warmupTime && (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) || noOutfittingChange || client->sess.noTeamChange )
{ {
ghost = qtrue; ghost = qtrue;
} }
@ -903,19 +906,6 @@ void G_StopFollowing( gentity_t *ent )
ent->client->ps.persistant[PERS_TEAM] = ent->client->sess.team; ent->client->ps.persistant[PERS_TEAM] = ent->client->sess.team;
ent->r.svFlags &= ~SVF_BOT; 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 // If we were in fact following someone, then make the angles and origin nice for
// when we stop // when we stop
if ( ent->client->sess.spectatorClient != -1 ) if ( ent->client->sess.spectatorClient != -1 )
@ -928,7 +918,7 @@ void G_StopFollowing( gentity_t *ent )
ent->client->ps.delta_angles[i] = ANGLE2SHORT(cl->ps.viewangles[i] - SHORT2ANGLE(ent->client->pers.cmd.angles[i])); ent->client->ps.delta_angles[i] = ANGLE2SHORT(cl->ps.viewangles[i] - SHORT2ANGLE(ent->client->pers.cmd.angles[i]));
} }
VectorCopy ( cl->ps.viewangles, ent->client->ps.viewangles ); VectorCopy ( cl->ps.viewangles, ent->client->ps.viewangles );
VectorCopy ( cl->ps.origin, ent->client->ps.origin ); VectorCopy ( cl->ps.origin, ent->client->ps.origin );
VectorClear ( ent->client->ps.velocity ); VectorClear ( ent->client->ps.velocity );
ent->client->ps.movementDir = 0; ent->client->ps.movementDir = 0;
@ -936,7 +926,18 @@ void G_StopFollowing( gentity_t *ent )
BG_PlayerStateToEntityState( &ent->client->ps, &ent->s, qtrue ); BG_PlayerStateToEntityState( &ent->client->ps, &ent->s, qtrue );
} }
ent->client->sess.spectatorClient = -1; // Ghots dont really become spectators, just psuedo spectators
if ( ent->client->sess.ghost )
{
// Do a start and stop to ensure the variables are all set properly
G_StopGhosting ( ent );
G_StartGhosting ( ent );
}
else
{
ent->client->sess.team = TEAM_SPECTATOR;
ent->client->ps.persistant[ PERS_TEAM ] = TEAM_SPECTATOR;
}
} }
/* /*
@ -1186,6 +1187,11 @@ static void G_SayTo( gentity_t *ent, gentity_t *other, int mode, const char *nam
return; return;
} }
if ( ent->client->sess.muted || G_IsClientChatIgnored ( other->s.number, ent->s.number ) )
{
return;
}
if ( !level.intermissiontime && !level.intermissionQueued ) if ( !level.intermissiontime && !level.intermissionQueued )
{ {
// Spectators cant talk to alive people // Spectators cant talk to alive people
@ -1674,7 +1680,7 @@ void Cmd_CallVote_f( gentity_t *ent )
trap_SendServerCommand( ent-g_entities, va("print \"You are not allowed to vote within %d minute of a failed vote.\n\"", g_failedVoteDelay.integer ) ); trap_SendServerCommand( ent-g_entities, va("print \"You are not allowed to vote within %d minute of a failed vote.\n\"", g_failedVoteDelay.integer ) );
return; return;
} }
// Save the voting client id // Save the voting client id
level.voteClient = ent->s.number; level.voteClient = ent->s.number;
@ -1737,6 +1743,12 @@ void Cmd_CallVote_f( gentity_t *ent )
} }
else if ( !Q_stricmp( arg1, "map" ) ) 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.voteString, sizeof( level.voteString ), "%s %s", arg1, arg2 );
Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "%s", level.voteString ); Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "%s", level.voteString );
} }
@ -1749,7 +1761,7 @@ void Cmd_CallVote_f( gentity_t *ent )
trap_Argv( 4, arg4, sizeof( arg4 ) ); 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.voteString, sizeof( level.voteString ), "rmgmap 1 %s 2 %s 3 %s 4 \"%s\" 0", arg2, arg3, arg4, ConcatArgs ( 5 ) );
Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "%s", level.voteString ); Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "Randomly Generated Map" );
} }
else if ( !Q_stricmp( arg1, "mapcycle" ) ) else if ( !Q_stricmp( arg1, "mapcycle" ) )
{ {
@ -1823,9 +1835,19 @@ void Cmd_CallVote_f( gentity_t *ent )
trap_SendServerCommand( ent-g_entities, va("print \"This server does not allow time extensions.\n\"") ); trap_SendServerCommand( ent-g_entities, va("print \"This server does not allow time extensions.\n\"") );
return; return;
} }
Com_sprintf ( level.voteString, sizeof(level.voteString ), "extendtime %d", g_timeextension.integer ); 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 ); 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 else
{ {
Com_sprintf( level.voteString, sizeof( level.voteString ), "%s \"%s\"", arg1, arg2 ); Com_sprintf( level.voteString, sizeof( level.voteString ), "%s \"%s\"", arg1, arg2 );
@ -1900,6 +1922,39 @@ void Cmd_Vote_f( gentity_t *ent )
// for players entering or leaving // 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));
}
}
/* /*
================= =================
@ -2030,6 +2085,8 @@ void ClientCommand( int clientNum ) {
Cmd_Vote_f (ent); Cmd_Vote_f (ent);
else if (Q_stricmp (cmd, "setviewpos") == 0) else if (Q_stricmp (cmd, "setviewpos") == 0)
Cmd_SetViewpos_f( ent ); Cmd_SetViewpos_f( ent );
else if (Q_stricmp ( cmd, "ignore" ) == 0 )
Cmd_Ignore_f ( ent );
#ifdef _SOF2_BOTS #ifdef _SOF2_BOTS
else if (Q_stricmp (cmd, "addbot") == 0) else if (Q_stricmp (cmd, "addbot") == 0)

View file

@ -67,7 +67,7 @@ void TossClientItems( gentity_t *self )
G_DropWeapon ( self, weapon, 0 ); G_DropWeapon ( self, weapon, 0 );
} }
G_DropGametypeItems ( self ); G_DropGametypeItems ( self, 0 );
} }
/* /*
@ -115,6 +115,7 @@ char *modNames[] =
"MOD_M1911A1_PISTOL", "MOD_M1911A1_PISTOL",
"MOD_US_SOCOM_PISTOL", "MOD_US_SOCOM_PISTOL",
"MOD_SILVER_TALON",
"MOD_M590_SHOTGUN", "MOD_M590_SHOTGUN",
"MOD_MICRO_UZI_SUBMACHINEGUN", "MOD_MICRO_UZI_SUBMACHINEGUN",
@ -124,6 +125,7 @@ char *modNames[] =
"MOD_USAS_12_SHOTGUN", "MOD_USAS_12_SHOTGUN",
"MOD_M4_ASSAULT_RIFLE", "MOD_M4_ASSAULT_RIFLE",
"MOD_AK74_ASSAULT_RIFLE", "MOD_AK74_ASSAULT_RIFLE",
"MOD_SIG551",
"MOD_MSG90A1_SNIPER_RIFLE", "MOD_MSG90A1_SNIPER_RIFLE",
"MOD_M60_MACHINEGUN", "MOD_M60_MACHINEGUN",
"MOD_MM1_GRENADE_LAUNCHER", "MOD_MM1_GRENADE_LAUNCHER",
@ -246,7 +248,12 @@ void player_die(
{ {
gentity_t* missile; gentity_t* missile;
missile = G_FireWeapon( self, ATTACK_NORMAL ); missile = G_FireWeapon( self, ATTACK_NORMAL );
missile->dflags |= DAMAGE_NO_TEAMKILL;
if ( attacker && attacker->client && attacker->client->sess.team != self->client->sess.team )
{
missile->dflags |= DAMAGE_NO_TEAMKILL;
}
if ( missile ) if ( missile )
{ {
VectorClear ( missile->s.pos.trDelta ); VectorClear ( missile->s.pos.trDelta );
@ -879,7 +886,7 @@ int G_Damage (
// if the attacker was on the same team // if the attacker was on the same team
if ( targ != attacker && OnSameTeam (targ, attacker) ) if ( targ != attacker && OnSameTeam (targ, attacker) )
{ {
if ( !g_friendlyFire.integer ) if ( !g_friendlyFire.integer || level.warmupTime )
{ {
return 0; return 0;
} }
@ -920,6 +927,17 @@ int G_Damage (
{ {
int actualtake = Com_Clamp ( 0, targ->health, take ); 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.teamkillDamage += actualtake;
attacker->client->sess.teamkillForgiveTime = level.time; attacker->client->sess.teamkillForgiveTime = level.time;
} }
@ -1027,7 +1045,7 @@ int G_Damage (
} }
// Friendly fire // Friendly fire
if ( g_friendlyFire.integer && targ != attacker && OnSameTeam ( targ, attacker ) ) if ( !level.warmupTime && g_friendlyFire.integer && targ != attacker && OnSameTeam ( targ, attacker ) )
{ {
vec3_t diff; vec3_t diff;
@ -1333,7 +1351,10 @@ qboolean G_RadiusDamage (
if ( d && ent->client ) if ( d && ent->client )
{ {
// Only one of the grenade hits will count for tk damage // Only one of the grenade hits will count for tk damage
dflags |= DAMAGE_NO_TEAMKILL; if ( ent != attacker )
{
dflags |= DAMAGE_NO_TEAMKILL;
}
// Put some procedural gore on the target. // Put some procedural gore on the target.
tent = G_TempEntity( origin, EV_EXPLOSION_HIT_FLESH ); tent = G_TempEntity( origin, EV_EXPLOSION_HIT_FLESH );

View file

@ -285,7 +285,7 @@ void G_ResetGametypeEntities ( void )
G_RespawnClients G_RespawnClients
=============== ===============
*/ */
void G_RespawnClients ( qboolean force, team_t team ) void G_RespawnClients ( qboolean force, team_t team, qboolean fullRestart )
{ {
int i; int i;
@ -339,6 +339,16 @@ void G_RespawnClients ( qboolean force, team_t team )
trap_UnlinkEntity (ent); trap_UnlinkEntity (ent);
ClientSpawn ( 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;
}
} }
} }
@ -422,7 +432,7 @@ void G_ResetEntities ( void )
G_ResetGametype G_ResetGametype
=============== ===============
*/ */
void G_ResetGametype ( void ) void G_ResetGametype ( qboolean fullRestart )
{ {
gentity_t* tent; gentity_t* tent;
@ -435,6 +445,13 @@ void G_ResetGametype ( void )
// Reset the gametype itself // Reset the gametype itself
G_ResetGametypeEntities ( ); 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 // Initialize the respawn interval since this is a interval gametype
switch ( level.gametypeData->respawnType ) switch ( level.gametypeData->respawnType )
{ {
@ -446,7 +463,7 @@ void G_ResetGametype ( void )
case RT_NONE: case RT_NONE:
level.gametypeDelayTime = level.time + g_roundstartdelay.integer * 1000; level.gametypeDelayTime = level.time + g_roundstartdelay.integer * 1000;
level.gametypeRoundTime = level.time + (g_roundtimelimit.integer * 60000); level.gametypeRoundTime = level.time + (g_roundtimelimit.integer * 60000) + g_roundstartdelay.integer * 1000;
if ( level.gametypeDelayTime != level.time ) if ( level.gametypeDelayTime != level.time )
{ {
@ -466,12 +483,21 @@ void G_ResetGametype ( void )
} }
// Respawn all clients // Respawn all clients
G_RespawnClients ( qtrue, TEAM_RED ); G_RespawnClients ( qtrue, TEAM_RED, fullRestart );
G_RespawnClients ( qtrue, TEAM_BLUE ); G_RespawnClients ( qtrue, TEAM_BLUE, fullRestart );
level.gametypeStartTime = level.time; level.gametypeStartTime = level.time;
level.gametypeResetTime = 0; 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 // Reset the clients local effects
tent = G_TempEntity( vec3_origin, EV_GAMETYPE_RESTART ); tent = G_TempEntity( vec3_origin, EV_GAMETYPE_RESTART );
tent->r.svFlags |= SVF_BROADCAST; tent->r.svFlags |= SVF_BROADCAST;
@ -615,7 +641,7 @@ G_DropGametypeItems
Drops all of the gametype items held by the player Drops all of the gametype items held by the player
================= =================
*/ */
void G_DropGametypeItems ( gentity_t* self ) void G_DropGametypeItems ( gentity_t* self, int delayPickup )
{ {
float angle; float angle;
int i; int i;
@ -642,9 +668,12 @@ void G_DropGametypeItems ( gentity_t* self )
drop->count = 1; drop->count = 1;
angle += 45; angle += 45;
drop->nextthink = level.time + 3000; if ( delayPickup )
drop->s.eFlags |= EF_NOPICKUP; {
drop->think = G_EnableGametypeItemPickup; drop->nextthink = level.time + delayPickup;
drop->s.eFlags |= EF_NOPICKUP;
drop->think = G_EnableGametypeItemPickup;
}
// TAke it away from the client just in case // TAke it away from the client just in case
self->client->ps.stats[STAT_GAMETYPE_ITEMS] &= ~(1<<i); self->client->ps.stats[STAT_GAMETYPE_ITEMS] &= ~(1<<i);
@ -675,10 +704,9 @@ void CheckGametype ( void )
// the first person joins // the first person joins
if ( !level.gametypeStartTime ) if ( !level.gametypeStartTime )
{ {
int counts[TEAM_NUM_TEAMS];
int i; int i;
memset ( counts, 0, sizeof(counts) ); memset ( level.teamAliveCount, 0, sizeof(level.teamAliveCount) );
for ( i = 0; i < level.numConnectedClients; i ++ ) for ( i = 0; i < level.numConnectedClients; i ++ )
{ {
@ -694,12 +722,12 @@ void CheckGametype ( void )
continue; continue;
} }
counts[other->client->sess.team]++; level.teamAliveCount[other->client->sess.team]++;
} }
if ( counts[TEAM_RED] || counts[TEAM_BLUE] ) if ( level.teamAliveCount[TEAM_RED] || level.teamAliveCount[TEAM_BLUE] || level.teamAliveCount[TEAM_FREE] )
{ {
G_ResetGametype ( ); G_ResetGametype ( qfalse );
return; return;
} }
} }
@ -712,7 +740,7 @@ void CheckGametype ( void )
// Dont do this again // Dont do this again
level.gametypeResetTime = 0; level.gametypeResetTime = 0;
G_ResetGametype ( ); G_ResetGametype ( qfalse );
} }
return; return;
@ -727,7 +755,7 @@ void CheckGametype ( void )
if ( level.gametypeRespawnTime[team] && level.time > level.gametypeRespawnTime[team] ) if ( level.gametypeRespawnTime[team] && level.time > level.gametypeRespawnTime[team] )
{ {
// Respawn all dead clients // Respawn all dead clients
G_RespawnClients ( qfalse, team ); G_RespawnClients ( qfalse, team, qfalse );
// Next interval // Next interval
level.gametypeRespawnTime[team] = 0; level.gametypeRespawnTime[team] = 0;
@ -736,13 +764,12 @@ void CheckGametype ( void )
} }
// If we are in RT_NONE respawn mode then we need to look for everyone being dead // If we are in RT_NONE respawn mode then we need to look for everyone being dead
if ( level.time > level.gametypeDelayTime && level.gametypeData->respawnType == RT_NONE && level.gametypeStartTime ) if ( level.gametypeData->respawnType == RT_NONE && level.gametypeStartTime )
{ {
int i; int i;
int alive[TEAM_NUM_TEAMS];
int dead[TEAM_NUM_TEAMS]; int dead[TEAM_NUM_TEAMS];
memset ( &alive[0], 0, sizeof(alive) ); memset ( &level.teamAliveCount[0], 0, sizeof(level.teamAliveCount) );
memset ( &dead[0], 0, sizeof(dead) ); memset ( &dead[0], 0, sizeof(dead) );
for ( i = 0; i < level.numConnectedClients; i ++ ) for ( i = 0; i < level.numConnectedClients; i ++ )
{ {
@ -759,26 +786,29 @@ void CheckGametype ( void )
} }
else else
{ {
alive[ent->client->sess.team] ++; level.teamAliveCount[ent->client->sess.team] ++;
} }
} }
// If everyone is dead on a team then reset the gametype, but only if if ( level.time > level.gametypeDelayTime )
// there was someone on that team to begin with.
if ( !alive[TEAM_RED] && dead[TEAM_RED] )
{
trap_GT_SendEvent ( GTEV_TEAM_ELIMINATED, level.time, TEAM_RED, 0, 0, 0, 0 );
}
else if ( !alive[TEAM_BLUE] && dead[TEAM_BLUE] )
{
trap_GT_SendEvent ( GTEV_TEAM_ELIMINATED, level.time, TEAM_BLUE, 0, 0, 0, 0 );
}
// See if the time has expired
if ( level.time > level.gametypeRoundTime )
{ {
trap_GT_SendEvent ( GTEV_TIME_EXPIRED, level.time, 0, 0, 0, 0, 0 ); // 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] )
{
trap_GT_SendEvent ( GTEV_TEAM_ELIMINATED, level.time, TEAM_RED, 0, 0, 0, 0 );
}
else if ( !level.teamAliveCount[TEAM_BLUE] && dead[TEAM_BLUE] )
{
trap_GT_SendEvent ( GTEV_TEAM_ELIMINATED, level.time, TEAM_BLUE, 0, 0, 0, 0 );
}
// See if the time has expired
if ( level.time > level.gametypeRoundTime )
{
trap_GT_SendEvent ( GTEV_TIME_EXPIRED, level.time, 0, 0, 0, 0, 0 );
}
}
} }
} }
@ -796,7 +826,7 @@ int G_GametypeCommand ( int cmd, int arg0, int arg1, int arg2, int arg3, int arg
case GTCMD_RESTART: case GTCMD_RESTART:
if ( arg0 <= 0 ) if ( arg0 <= 0 )
{ {
G_ResetGametype ( ); G_ResetGametype ( qfalse );
} }
else else
{ {

View file

@ -298,6 +298,7 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace)
int respawn; int respawn;
qboolean predict; qboolean predict;
qboolean autoswitch; qboolean autoswitch;
int eventID;
if (!other->client) if (!other->client)
return; return;
@ -362,19 +363,25 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace)
return; return;
} }
if ( !respawn ) if ( !respawn && !(ent->flags & FL_DROPPED_ITEM) )
{ {
return; 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 // play the normal pickup sound
if (predict) if (predict)
{ {
G_AddPredictableEvent( other, EV_ITEM_PICKUP, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) ); G_AddPredictableEvent( other, eventID, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) );
} }
else else
{ {
G_AddEvent( other, EV_ITEM_PICKUP, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) ); G_AddEvent( other, eventID, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) );
} }
// fire item targets // fire item targets
@ -610,6 +617,12 @@ gentity_t* G_DropWeapon ( gentity_t* ent, weapon_t weapon, int pickupDelay )
return NULL; return NULL;
} }
// Make sure they have the weapon
if ( !(ent->client->ps.stats[STAT_WEAPONS] & (1<<weapon) ) )
{
return NULL;
}
// No more outfitting changes // No more outfitting changes
ent->client->noOutfittingChange = qtrue; ent->client->noOutfittingChange = qtrue;
@ -847,11 +860,28 @@ void SaveRegisteredItems( void )
G_ItemDisabled G_ItemDisabled
============ ============
*/ */
int G_ItemDisabled( gitem_t *item ) qboolean G_ItemDisabled( gitem_t *item )
{ {
char name[128]; char name[128];
int val;
Com_sprintf(name, sizeof(name), "disable_%s", item->classname); Com_sprintf(name, sizeof(name), "disable_%s", item->classname);
return trap_Cvar_VariableIntegerValue( name );
val = trap_Cvar_VariableIntegerValue( name );
if ( !val )
{
return qfalse;
}
if ( val == 2 )
{
if ( !level.gametypeData->pickupsDisabled )
{
return qfalse;
}
}
return qtrue;
} }
/* /*

View file

@ -188,6 +188,7 @@ typedef enum
SPECTATOR_NOT, SPECTATOR_NOT,
SPECTATOR_FREE, SPECTATOR_FREE,
SPECTATOR_FOLLOW, SPECTATOR_FOLLOW,
SPECTATOR_FOLLOWFIRST,
SPECTATOR_SCOREBOARD SPECTATOR_SCOREBOARD
} spectatorState_t; } spectatorState_t;
@ -233,6 +234,7 @@ typedef struct
team_t team; // current team team_t team; // current team
int spectatorTime; // for determining next-in-line to play int spectatorTime; // for determining next-in-line to play
spectatorState_t spectatorState; spectatorState_t spectatorState;
qboolean spectatorFirstPerson; // First person following?
int spectatorClient; // for chasecam and follow mode int spectatorClient; // for chasecam and follow mode
int score; // total score int score; // total score
int kills; // number of kills int kills; // number of kills
@ -241,6 +243,8 @@ typedef struct
int teamkillDamage; // amount of damage death to teammates int teamkillDamage; // amount of damage death to teammates
int teamkillForgiveTime; // time when team damage will be forgivin int teamkillForgiveTime; // time when team damage will be forgivin
qboolean noTeamChange; // cant change teams when this is true (rt_none only) 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; } clientSession_t;
@ -362,7 +366,7 @@ struct gclient_s
int voiceFloodTimer; // Timer used to forgive voice chat flooding int voiceFloodTimer; // Timer used to forgive voice chat flooding
int voiceFloodCount; // Amount of voice chats that need to be forgivin int voiceFloodCount; // Amount of voice chats that need to be forgivin
int voiceFloodPenalty; // Time when a client can voice chat again int voiceFloodPenalty; // Time when a client can voice chat again
// Anti-lag information // Anti-lag information
gantilag_t antilag[MAX_ANTILAG]; gantilag_t antilag[MAX_ANTILAG];
gantilag_t antilagUndo; gantilag_t antilagUndo;
@ -424,6 +428,7 @@ typedef struct
int globalVoiceTime; // last global voice int globalVoiceTime; // last global voice
int teamScores[TEAM_NUM_TEAMS]; int teamScores[TEAM_NUM_TEAMS];
int teamAliveCount[TEAM_NUM_TEAMS];
int lastTeamLocationTime; // last time of client team location update int lastTeamLocationTime; // last time of client team location update
qboolean newSession; // don't use any old session data, because qboolean newSession; // don't use any old session data, because
@ -607,6 +612,7 @@ void G_Sound( gentity_t *ent, int channel, int soundIndex );
void G_SoundAtLoc( vec3_t loc, 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_EntitySound( gentity_t *ent, int channel, int soundIndex );
void G_FreeEntity( gentity_t *e ); void G_FreeEntity( gentity_t *e );
void G_FreeEnitityChildren( gentity_t* ent );
qboolean G_EntitiesFree( void ); qboolean G_EntitiesFree( void );
void G_TouchTriggers (gentity_t *ent); void G_TouchTriggers (gentity_t *ent);
@ -747,6 +753,8 @@ void G_UpdateClientAnimations ( gentity_t* ent );
void G_SetRespawnTimer ( gentity_t* ent ); void G_SetRespawnTimer ( gentity_t* ent );
gentity_t* G_FindNearbyClient ( vec3_t origin, team_t team, float radius, gentity_t* ignore ); gentity_t* G_FindNearbyClient ( vec3_t origin, team_t team, float radius, gentity_t* ignore );
void G_AddClientSpawn ( gentity_t* ent, team_t team ); 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 // g_svcmds.c
@ -826,7 +834,8 @@ qboolean G_BotConnect( int clientNum, qboolean restart );
void Svcmd_AddBot_f( void ); void Svcmd_AddBot_f( void );
void Svcmd_BotList_f( void ); void Svcmd_BotList_f( void );
void BotInterbreedEndMatch( void ); void BotInterbreedEndMatch( void );
qboolean G_DoesMapSupportGametype ( const char* gametype ); qboolean G_DoesMapSupportGametype ( const char* gametype );
qboolean G_DoesMapExist ( const char* mapname );
void G_LoadArenas ( void ); void G_LoadArenas ( void );
// //
@ -837,11 +846,11 @@ gentity_t* G_SpawnGametypeItem ( const char* pickup_name, qboolean dropped,
gentity_t* G_SelectRandomGametypeSpawnPoint ( team_t team ); gentity_t* G_SelectRandomGametypeSpawnPoint ( team_t team );
qboolean G_ParseGametypeFile ( void ); qboolean G_ParseGametypeFile ( void );
qboolean G_ExecuteGametypeScript ( gentity_t* activator, const char* name ); qboolean G_ExecuteGametypeScript ( gentity_t* activator, const char* name );
void G_ResetGametype ( void ); void G_ResetGametype ( qboolean fullRestart );
qboolean G_CanGametypeTriggerBeUsed ( gentity_t* self, gentity_t* activator ); qboolean G_CanGametypeTriggerBeUsed ( gentity_t* self, gentity_t* activator );
void G_ResetGametypeItem ( gitem_t* item ); void G_ResetGametypeItem ( gitem_t* item );
void gametype_item_use ( gentity_t* self, gentity_t* other ); void gametype_item_use ( gentity_t* self, gentity_t* other );
void G_DropGametypeItems ( gentity_t* self ); void G_DropGametypeItems ( gentity_t* self, int delayPickup );
// ai_main.c // ai_main.c
#define MAX_FILEPATH 144 #define MAX_FILEPATH 144
@ -928,6 +937,8 @@ extern vmCvar_t g_teamkillPenalty;
extern vmCvar_t g_teamkillDamageMax; extern vmCvar_t g_teamkillDamageMax;
extern vmCvar_t g_teamkillDamageForgive; extern vmCvar_t g_teamkillDamageForgive;
extern vmCvar_t g_teamkillBanTime; extern vmCvar_t g_teamkillBanTime;
extern vmCvar_t g_teamkillNoExcuseTime;
extern vmCvar_t g_teamkillNoExcuseMultiplier;
extern vmCvar_t g_voiceFloodCount; extern vmCvar_t g_voiceFloodCount;
extern vmCvar_t g_voiceFloodPenalty; extern vmCvar_t g_voiceFloodPenalty;
extern vmCvar_t g_voiceTalkingGhosts; extern vmCvar_t g_voiceTalkingGhosts;

View file

@ -79,6 +79,8 @@ vmCvar_t g_teamkillPenalty; // Amount of score added for killing a teammates
vmCvar_t g_teamkillDamageMax; // max damage one can do to teammates before being kicked 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_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_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_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_voiceFloodPenalty; // Amount of time a void flooder must wait before they can use voice again
vmCvar_t g_suddenDeath; vmCvar_t g_suddenDeath;
@ -166,7 +168,28 @@ static cvarTable_t gameCvarTable[] =
{ &g_roundstartdelay, "g_roundstartdelay", "5", 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", "22222222222211", CVAR_ARCHIVE|CVAR_SERVERINFO|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, { &g_availableWeapons, "g_availableWeapons", "0", CVAR_SERVERINFO|CVAR_ROM|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_weapon_knife", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_US_SOCOM", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_M19", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_silvertalon", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_microuzi", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_M3A1", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_MP5", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_USAS_12", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_M590", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_MSG90A1", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_M4", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_AK_74", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_SIG551", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_M60", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_RPG_7", "2", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_MM_1", "2", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_M84", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_SMOHG92", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_AN_M14", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_M15", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ &g_forceFollow, "g_forceFollow", "0", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse }, { &g_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 }, { &g_followEnemy, "g_followEnemy", "1", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
@ -180,10 +203,12 @@ static cvarTable_t gameCvarTable[] =
{ &g_voiceFloodCount, "g_voiceFloodCount", "6", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, { &g_voiceFloodCount, "g_voiceFloodCount", "6", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
{ &g_voiceFloodPenalty, "g_voiceFloodPenalty", "60", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, { &g_voiceFloodPenalty, "g_voiceFloodPenalty", "60", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
{ &g_teamkillPenalty, "g_teamkillPenalty", "-1", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, { &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_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_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_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_suddenDeath, "g_suddenDeath", "1", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
@ -417,6 +442,47 @@ void G_UpdateCvars( void )
} }
} }
/*
===============
G_UpdateAvailableWeapons
Updates the g_availableWeapons cvar using the disable cvars.
===============
*/
void G_UpdateAvailableWeapons ( void )
{
weapon_t weapon;
char available[WP_NUM_WEAPONS+1];
memset ( available, 0, sizeof(available) );
for ( weapon = WP_KNIFE; weapon < WP_NUM_WEAPONS; weapon ++ )
{
gitem_t* item = BG_FindWeaponItem ( weapon );
if ( !item )
{
continue;
}
switch ( (int)trap_Cvar_VariableValue ( va("disable_%s", item->classname ) ) )
{
case 0:
available[weapon-1] = '2';
break;
case 1:
available[weapon-1] = '0';
break;
case 2:
available[weapon-1] = '1';
break;
}
}
trap_Cvar_Set ( "g_availableWeapons", available );
}
/* /*
=============== ===============
G_SetGametype G_SetGametype
@ -512,6 +578,9 @@ void G_InitGame( int levelTime, int randomSeed, int restart )
// Set the current gametype // Set the current gametype
G_SetGametype(g_gametype.string); G_SetGametype(g_gametype.string);
// Sets the available weapons cvar from the disable_ cvars.
G_UpdateAvailableWeapons ( );
// Set the available outfitting // Set the available outfitting
BG_SetAvailableOutfitting ( g_availableWeapons.string ); BG_SetAvailableOutfitting ( g_availableWeapons.string );
@ -1362,15 +1431,18 @@ void CheckExitRules( void )
// Check to see if the timelimit was hit // Check to see if the timelimit was hit
if ( g_timelimit.integer && !level.warmupTime ) if ( g_timelimit.integer && !level.warmupTime )
{ {
if ( level.time - level.startTime >= (g_timelimit.integer + level.timeExtension)*60000 ) if ( level.gametypeData->respawnType != RT_NONE || level.gametypeResetTime )
{ {
gentity_t* tent; if ( level.time - level.startTime >= (g_timelimit.integer + level.timeExtension)*60000 )
tent = G_TempEntity( vec3_origin, EV_GAME_OVER ); {
tent->s.eventParm = GAME_OVER_TIMELIMIT; gentity_t* tent;
tent->r.svFlags = SVF_BROADCAST; tent = G_TempEntity( vec3_origin, EV_GAME_OVER );
tent->s.eventParm = GAME_OVER_TIMELIMIT;
tent->r.svFlags = SVF_BROADCAST;
LogExit( "Timelimit hit." ); LogExit( "Timelimit hit." );
return; return;
}
} }
} }
@ -1509,10 +1581,12 @@ void CheckWarmup ( void )
// if the warmup time has counted down, restart // if the warmup time has counted down, restart
if ( level.time > level.warmupTime ) if ( level.time > level.warmupTime )
{ {
level.warmupTime += 10000; // level.warmupTime += 10000;
trap_Cvar_Set( "g_restarted", "1" ); // trap_Cvar_Set( "g_restarted", "1" );
trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" );
level.restarted = qtrue; G_ResetGametype ( qtrue );
// trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" );
// level.restarted = qtrue;
return; return;
} }
} }

View file

@ -119,7 +119,7 @@ void G_ExplodeMissile( gentity_t *ent ) {
if (ent->dflags & DAMAGE_AREA_DAMAGE) if (ent->dflags & DAMAGE_AREA_DAMAGE)
{ {
// do damage over time rather than instantly // do damage over time rather than instantly
G_CreateDamageArea ( ent->r.currentOrigin, ent->parent, ent->splashDamage*0.05f,ent->splashRadius, 8000,ent->methodOfDeath ); G_CreateDamageArea ( ent->r.currentOrigin, ent->parent, ent->splashDamage*0.06f,ent->splashRadius, 8000,ent->methodOfDeath );
// do some instant damage // do some instant damage
G_RadiusDamage( ent->r.currentOrigin, ent->parent, ent->damage, ent->splashRadius, ent, G_RadiusDamage( ent->r.currentOrigin, ent->parent, ent->damage, ent->splashRadius, ent,
@ -443,7 +443,7 @@ void G_MissileImpact( gentity_t *ent, trace_t *trace )
if (ent->dflags & DAMAGE_AREA_DAMAGE) if (ent->dflags & DAMAGE_AREA_DAMAGE)
{ {
// do damage over time rather than instantly // do damage over time rather than instantly
G_CreateDamageArea ( trace->endpos, ent->parent, ent->splashDamage*0.10f,ent->splashRadius*2, 8000,ent->methodOfDeath ); G_CreateDamageArea ( trace->endpos, ent->parent, ent->splashDamage*0.06f,ent->splashRadius*2, 8000,ent->methodOfDeath );
// do some instant damage // do some instant damage
G_RadiusDamage( trace->endpos, ent->parent, ent->damage, ent->splashRadius, other, G_RadiusDamage( trace->endpos, ent->parent, ent->damage, ent->splashRadius, other,
@ -554,21 +554,13 @@ void G_RunMissile( gentity_t *ent )
if ( tr.fraction != 1 ) if ( tr.fraction != 1 )
{ {
// Hit the sky or moving through something // Hit the sky or moving through something
if ( tr.surfaceFlags & SURF_NOIMPACT ) if ( (tr.surfaceFlags & SURF_NOIMPACT) && (tr.surfaceFlags & SURF_SKY) )
{ {
// Dont kill a missle that hits the sky and has gravity // 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;
ent->s.eFlags |= EF_INSKY; VectorCopy ( origin, ent->r.currentOrigin );
ent->r.svFlags |= SVF_BROADCAST; trap_LinkEntity( ent );
VectorCopy ( origin, ent->r.currentOrigin );
trap_LinkEntity( ent );
}
else
{
G_FreeEntity( ent );
return;
}
} }
else else
{ {

View file

@ -24,7 +24,10 @@
#define SVF_GLASS_BRUSH 0x08000000 // Ent is a glass brush #define SVF_GLASS_BRUSH 0x08000000 // Ent is a glass brush
#define SVF_DOUBLED_BBOX 0x00001000 // Bounding box has been doubled #define SVF_INFLATED_BBOX 0x00001000 // Bounding box has been doubled
#define SVF_LINKHACK 0x10000000 // Hack to link an entity into extra clusters
#define SVF_DETAIL 0x20000000 // Entity is a detail entity and can be dropped from the snapshot
#define SVF_SKIP 0x80000000 // Dont include this entity in the current snapshot (internal use only)
//=============================================================== //===============================================================
@ -63,6 +66,8 @@ typedef struct {
// by the second array index. // by the second array index.
int broadcastClients[2]; int broadcastClients[2];
int detailTime;
} entityShared_t; } entityShared_t;

View file

@ -261,6 +261,7 @@ spawn_t spawns[] =
{"pickup_ammo", 0}, {"pickup_ammo", 0},
{"script_runner", 0}, {"script_runner", 0},
{"trigger_arioche_objective", 0}, {"trigger_arioche_objective", 0},
{"func_brushmodel_child", 0},
{0, 0} {0, 0}
}; };
@ -1017,7 +1018,7 @@ void SP_worldspawn( void )
trap_SetConfigstring( CS_MOTD, g_motd.string ); // message of the day trap_SetConfigstring( CS_MOTD, g_motd.string ); // message of the day
G_SpawnString( "gravity", "800", &text ); G_SpawnString( "gravity", va("%d", g_gravity.integer), &text );
trap_Cvar_Set( "g_gravity", text ); trap_Cvar_Set( "g_gravity", text );
// Handle all the worldspawn stuff common to both main bsp and sub bsp // Handle all the worldspawn stuff common to both main bsp and sub bsp

View file

@ -103,6 +103,44 @@ void Svcmd_AutoKickList_f ( void )
} }
} }
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 *ClientForString( const char *s ) {
gclient_t *cl; gclient_t *cl;
int i; int i;
@ -228,7 +266,8 @@ qboolean ConsoleCommand( void )
if (Q_stricmp (cmd, "gametype_restart" ) == 0 ) if (Q_stricmp (cmd, "gametype_restart" ) == 0 )
{ {
G_ResetGametype ( ); trap_Argv( 1, cmd, sizeof( cmd ) );
G_ResetGametype ( Q_stricmp ( cmd, "full" ) == 0 );
return qtrue; return qtrue;
} }
@ -244,6 +283,12 @@ qboolean ConsoleCommand( void )
return qtrue; return qtrue;
} }
if ( Q_stricmp ( cmd, "mute" ) == 0 )
{
Svcmd_Mute_f ( );
return qtrue;
}
if (g_dedicated.integer) if (g_dedicated.integer)
{ {
if (Q_stricmp (cmd, "say") == 0) if (Q_stricmp (cmd, "say") == 0)

View file

@ -518,6 +518,33 @@ void G_FreeEntity( gentity_t *ed )
ed->inuse = qfalse; 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 G_TempEntity
@ -695,6 +722,7 @@ void G_SoundAtLoc( vec3_t loc, int channel, int soundIndex ) {
te = G_TempEntity( loc, EV_GENERAL_SOUND ); te = G_TempEntity( loc, EV_GENERAL_SOUND );
te->s.eventParm = soundIndex; te->s.eventParm = soundIndex;
te->r.svFlags |= SVF_BROADCAST;
} }
/* /*

View file

@ -210,6 +210,8 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
int i; int i;
vec3_t muzzlePoint; vec3_t muzzlePoint;
vec3_t fwd; vec3_t fwd;
vec3_t right;
vec3_t up;
vec3_t fireAngs; vec3_t fireAngs;
float damageMult; float damageMult;
int hitcount; int hitcount;
@ -239,14 +241,14 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
inaccuracy = (float)ent->client->ps.inaccuracy / 1000.0f; inaccuracy = (float)ent->client->ps.inaccuracy / 1000.0f;
if ( detailed ) if ( detailed )
{ {
if ( ent->client->ps.pm_flags & PMF_DUCKED ) if ( ent->client->ps.pm_flags & PMF_JUMPING )
{
inaccuracy *= DUCK_ACCURACY_MODIFIER;
}
else if ( ent->client->ps.pm_flags & PMF_JUMPING )
{ {
inaccuracy *= JUMP_ACCURACY_MODIFIER; inaccuracy *= JUMP_ACCURACY_MODIFIER;
} }
else if ( ent->client->ps.pm_flags & PMF_DUCKED )
{
inaccuracy *= DUCK_ACCURACY_MODIFIER;
}
} }
// Anti-lag // Anti-lag
@ -258,18 +260,14 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
// Handle leaning // Handle leaning
VectorCopy(ent->client->ps.viewangles, fireAngs); VectorCopy(ent->client->ps.viewangles, fireAngs);
AngleVectors( fireAngs, fwd, right, up);
if ( ent->client->ps.pm_flags & PMF_LEANING ) if ( ent->client->ps.pm_flags & PMF_LEANING )
{ {
vec3_t right; BG_ApplyLeanOffset ( &ent->client->ps, muzzlePoint );
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 // Move the start trace back a bit to account for bumping up against someone
VectorMA ( muzzlePoint, -15, fwd, muzzlePoint ); VectorMA ( muzzlePoint, -15, fwd, muzzlePoint );
@ -486,7 +484,7 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
if ( level.time - traceEnt->client->invulnerableTime >= g_respawnInvulnerability.integer * 1000 ) if ( level.time - traceEnt->client->invulnerableTime >= g_respawnInvulnerability.integer * 1000 )
{ {
// Shot my a teammate with ff off? // Shot my a teammate with ff off?
if ( !level.gametypeData->teams || (ent->client && !(OnSameTeam(ent,traceEnt) && !g_friendlyFire.integer ) ) ) if ( !level.gametypeData->teams || (ent->client && !(OnSameTeam(ent,traceEnt) && (!g_friendlyFire.integer || level.warmupTime) ) ) )
{ {
flesh = qtrue; flesh = qtrue;
} }
@ -526,6 +524,8 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
tent->s.eventParm <<= MATERIAL_BITS; tent->s.eventParm <<= MATERIAL_BITS;
tent->s.eventParm |= (tr.surfaceFlags & MATERIAL_MASK); tent->s.eventParm |= (tr.surfaceFlags & MATERIAL_MASK);
tent->s.time = weapon + ((attack&0xFF)<<8); 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; tent->s.otherEntityNum = ent->s.number;
@ -601,12 +601,7 @@ gentity_t* G_FireProjectile ( gentity_t *ent, weapon_t weapon, attackType_t atta
if ( ent->client->ps.pm_flags & PMF_LEANING ) if ( ent->client->ps.pm_flags & PMF_LEANING )
{ {
float leanOffset; BG_ApplyLeanOffset ( &ent->client->ps, muzzlePoint );
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 ); AngleVectors( fireAngs, fwd, right, up );

View file

@ -54,42 +54,44 @@ typedef enum
MODELINDEX_WEAPON_KNIFE, // 6 MODELINDEX_WEAPON_KNIFE, // 6
MODELINDEX_WEAPON_SOCOM, MODELINDEX_WEAPON_SOCOM,
MODELINDEX_WEAPON_M19, MODELINDEX_WEAPON_M19,
MODELINDEX_WEAPON_MICROUZI, MODELINDEX_WEAPON_SILVERTALON,
MODELINDEX_WEAPON_M3A1, MODELINDEX_WEAPON_MICROUZI,
MODELINDEX_WEAPON_USAS12, // 11 MODELINDEX_WEAPON_M3A1, // 11
MODELINDEX_WEAPON_MP5,
MODELINDEX_WEAPON_USAS12,
MODELINDEX_WEAPON_M590, MODELINDEX_WEAPON_M590,
MODELINDEX_WEAPON_MSG90A1, MODELINDEX_WEAPON_MSG90A1,
MODELINDEX_WEAPON_M4,
MODELINDEX_WEAPON_AK74,
MODELINDEX_WEAPON_M60, // 16 MODELINDEX_WEAPON_M4, // 16
MODELINDEX_WEAPON_AK74,
MODELINDEX_WEAPON_SIG551,
MODELINDEX_WEAPON_M60,
MODELINDEX_WEAPON_RPG7, MODELINDEX_WEAPON_RPG7,
MODELINDEX_WEAPON_MM1,
MODELINDEX_WEAPON_MM1, // 21
MODELINDEX_WEAPON_M84, MODELINDEX_WEAPON_M84,
MODELINDEX_WEAPON_SMOHG92, MODELINDEX_WEAPON_SMOHG92,
MODELINDEX_WEAPON_ANM14,
MODELINDEX_WEAPON_ANM14, // 21
MODELINDEX_WEAPON_M15, MODELINDEX_WEAPON_M15,
MODELINDEX_WEAPON_MP5,
MODELINDEX_AMMO_045, MODELINDEX_AMMO_045, // 26
MODELINDEX_AMMO_9MM, MODELINDEX_AMMO_9MM,
MODELINDEX_AMMO_12GAUGE, MODELINDEX_AMMO_12GAUGE,
MODELINDEX_AMMO_762,
MODELINDEX_AMMO_556,
MODELINDEX_AMMO_762, // 26 MODELINDEX_AMMO_40MM, // 31
MODELINDEX_AMMO_556,
MODELINDEX_AMMO_40MM,
MODELINDEX_AMMO_RPG7, MODELINDEX_AMMO_RPG7,
MODELINDEX_BACKPACK, MODELINDEX_BACKPACK,
MODELINDEX_GAMETYPE_ITEM, // 31 MODELINDEX_GAMETYPE_ITEM, // 34
MODELINDEX_GAMETYPE_ITEM_2, MODELINDEX_GAMETYPE_ITEM_2,
MODELINDEX_GAMETYPE_ITEM_3, MODELINDEX_GAMETYPE_ITEM_3,
MODELINDEX_GAMETYPE_ITEM_4, MODELINDEX_GAMETYPE_ITEM_4,
MODELINDEX_GAMETYPE_ITEM_5, MODELINDEX_GAMETYPE_ITEM_5,
MODELINDEX_ARMOR, // 36 MODELINDEX_ARMOR, // 39
MODELINDEX_NIGHTVISION, MODELINDEX_NIGHTVISION,
MODELINDEX_THERMAL, MODELINDEX_THERMAL,

View file

@ -6,12 +6,49 @@
// q_shared.h -- included first by ALL program modules. // q_shared.h -- included first by ALL program modules.
// A user mod should never modify this file // A user mod should never modify this file
#ifdef GERMAN_BUILD //#define Q3_VERSION "SOF2MP V0.01" sent on 11/26/2001
#define Q3_VERSION "SOF2MP V1.01g" // sent on 6/10/2002 //#define Q3_VERSION "SOF2MP V0.02" sent on 12/10/2001
#define SOF2_VERSION_ID "1.01g" // sent on 6/10/2002 //#define Q3_VERSION "SOF2MP V0.03" sent on 12/16/2001
//#define Q3_VERSION "SOF2MP V0.081" sent on 1/15/2002
//#define Q3_VERSION "SOF2MP V0.09" sent on 1/24/2002
//#define Q3_VERSION "SOF2MP V0.10" sent on 1/31/2002
//#define Q3_VERSION "SOF2MP V0.11" sent on 2/7/2002
//#define Q3_VERSION "SOF2MP V0.12" sent on 2/14/2002
//#define Q3_VERSION "SOF2MP V0.13" sent on 2/21/2002
//#define Q3_VERSION "SOF2MP V0.13b" public beta #1 on 3/1/3002
//#define Q3_VERSION "SOF2MP V0.14" sent on 3/4/2002
//#define Q3_VERSION "SOF2MP V0.15" sent on 3/11/2002
//#define Q3_VERSION "SOF2MP V0.15b" public beta #2 on 3/13/2002
//#define Q3_VERSION "SOF2MP V0.16" sent on 3/18/2002
//#define Q3_VERSION "SOF2MP V0.16b" public beta #3 on 3/20/2002
//#define Q3_VERSION "SOF2MP V0.17" sent on 3/24/2002
//#define Q3_VERSION "SOF2MP TEST V1.01t" sent on 3/28/2002
//#define Q3_VERSION "SOF2MP V0.18" sent on 4/1/2002 - April Fools!
//#define Q3_VERSION "SOF2MP V1.02t" sent on 4/5/2002
//#define Q3_VERSION "SOF2MP V0.19" sent on 4/8/2002
//#define Q3_VERSION "SOF2MP V0.20" sent on 4/15/2002 - Tax Day!
//#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
#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 #else
#define Q3_VERSION "SOF2MP V1.01" // sent on 6/10/2002
#define SOF2_VERSION_ID "1.01" // sent on 6/10/2002 #define Q3_VERSION "SOF2MP V1.02 Developer" // sent on 6/10/2002
// #define SOF2_VERSION_ID "1.00"
#define SOF2_VERSION_ID "1.02D" // sent on 6/10/2002
#endif #endif
//#define SPECIAL_PRE_CACHE 1 //#define SPECIAL_PRE_CACHE 1

File diff suppressed because it is too large Load diff

View file

@ -17,6 +17,7 @@ CFG=gt_ctf - Win32 Debug SoF2
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !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 "gt_ctf - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE !MESSAGE
@ -26,8 +27,38 @@ CPP=cl.exe
MTL=midl.exe MTL=midl.exe
RSC=rc.exe RSC=rc.exe
!IF "$(CFG)" == "gt_ctf - Win32 Debug SoF2" !IF "$(CFG)" == "gt_ctf - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GT_CTF_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GT_CTF_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
!ELSEIF "$(CFG)" == "gt_ctf - Win32 Debug SoF2"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug SoF2"
# PROP BASE Intermediate_Dir "Debug SoF2"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
# PROP Use_Debug_Libraries 1 # PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\Debug" # PROP Output_Dir "..\..\Debug"
@ -51,6 +82,7 @@ LINK32=link.exe
# Begin Target # Begin Target
# Name "gt_ctf - Win32 Debug"
# Name "gt_ctf - Win32 Debug SoF2" # Name "gt_ctf - Win32 Debug SoF2"
# Begin Group "Source Files" # Begin Group "Source Files"

View file

@ -36,10 +36,9 @@ static cvarTable_t gametypeCvarTable[] =
// don't override the cheat state set by the system // don't override the cheat state set by the system
{ &gt_flagReturnTime, "gt_flagReturnTime", "30", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, { &gt_flagReturnTime, "gt_flagReturnTime", "30", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
{ &gt_simpleScoring, "gt_simpleScoring", "0", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, { &gt_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 vmMain
@ -79,10 +78,9 @@ GT_RegisterCvars
*/ */
void GT_RegisterCvars( void ) void GT_RegisterCvars( void )
{ {
int i;
cvarTable_t *cv; cvarTable_t *cv;
for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ ) for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ )
{ {
trap_Cvar_Register( cv->vmCvar, cv->cvarName, cv->defaultString, cv->cvarFlags, cv->mMinValue, cv->mMaxValue ); trap_Cvar_Register( cv->vmCvar, cv->cvarName, cv->defaultString, cv->cvarFlags, cv->mMinValue, cv->mMaxValue );
@ -100,10 +98,9 @@ GT_UpdateCvars
*/ */
void GT_UpdateCvars( void ) void GT_UpdateCvars( void )
{ {
int i;
cvarTable_t *cv; cvarTable_t *cv;
for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ ) for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ )
{ {
if ( cv->vmCvar ) if ( cv->vmCvar )
{ {

View file

@ -23,8 +23,6 @@ CFG=gt_dem - Win32 Debug SoF2
# Begin Project # Begin Project
# PROP AllowPerConfigDependencies 0 # PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""$/SoF2/code/gametype/gt_dem", ZRDAAAAA"
# PROP Scc_LocalPath "."
CPP=cl.exe CPP=cl.exe
MTL=midl.exe MTL=midl.exe
RSC=rc.exe RSC=rc.exe

View file

@ -41,7 +41,7 @@ static cvarTable_t gametypeCvarTable[] =
{ &gt_bombDefuseTime, "gt_bombDefuseTime", "3", CVAR_ARCHIVE|CVAR_LATCH, 0.0f, 0.0f, 0, qfalse }, { &gt_bombDefuseTime, "gt_bombDefuseTime", "3", CVAR_ARCHIVE|CVAR_LATCH, 0.0f, 0.0f, 0, qfalse },
{ &gt_bombPlantTime, "gt_bombPlantTime", "3", CVAR_ARCHIVE|CVAR_LATCH, 0.0f, 0.0f, 0, qfalse }, { &gt_bombPlantTime, "gt_bombPlantTime", "3", CVAR_ARCHIVE|CVAR_LATCH, 0.0f, 0.0f, 0, qfalse },
{ &gt_simpleScoring, "gt_simpleScoring", "0", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, { &gt_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] ); static int gametypeCvarTableSize = sizeof( gametypeCvarTable ) / sizeof( gametypeCvarTable[0] );
@ -88,10 +88,9 @@ GT_RegisterCvars
*/ */
void GT_RegisterCvars( void ) void GT_RegisterCvars( void )
{ {
int i;
cvarTable_t *cv; cvarTable_t *cv;
for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ ) for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ )
{ {
trap_Cvar_Register( cv->vmCvar, cv->cvarName, cv->defaultString, cv->cvarFlags, cv->mMinValue, cv->mMaxValue ); trap_Cvar_Register( cv->vmCvar, cv->cvarName, cv->defaultString, cv->cvarFlags, cv->mMinValue, cv->mMaxValue );
@ -109,10 +108,9 @@ GT_UpdateCvars
*/ */
void GT_UpdateCvars( void ) void GT_UpdateCvars( void )
{ {
int i;
cvarTable_t *cv; cvarTable_t *cv;
for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ ) for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ )
{ {
if ( cv->vmCvar ) if ( cv->vmCvar )
{ {
@ -248,12 +246,12 @@ void GT_RunFrame ( int time )
trap_Cmd_TextMessage ( -1, "Blue team has destroyed the target!" ); trap_Cmd_TextMessage ( -1, "Blue team has destroyed the target!" );
trap_Cmd_StartGlobalSound ( gametype.bombExplodedSound ); trap_Cmd_StartGlobalSound ( gametype.bombExplodedSound );
trap_Cmd_Restart ( 5 ); trap_Cmd_Restart ( 5 );
}
// Give the guy who planted it some props // Give the guy who planted it some props
if ( !gt_simpleScoring.integer ) if ( !gt_simpleScoring.integer )
{ {
trap_Cmd_AddClientScore ( gametype.bombPlantClient, 10 ); trap_Cmd_AddClientScore ( gametype.bombPlantClient, 10 );
}
} }
gametype.bombPlantTime = 0; gametype.bombPlantTime = 0;
@ -341,6 +339,7 @@ int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int ar
trap_Cmd_TextMessage ( -1, "Red team has defended the bomb site!" ); trap_Cmd_TextMessage ( -1, "Red team has defended the bomb site!" );
trap_Cmd_AddTeamScore ( TEAM_RED, 1 ); trap_Cmd_AddTeamScore ( TEAM_RED, 1 );
trap_Cmd_Restart ( 5 ); trap_Cmd_Restart ( 5 );
gametype.roundOver = qtrue;
break; break;
case GTEV_TEAM_ELIMINATED: case GTEV_TEAM_ELIMINATED:
@ -380,11 +379,11 @@ int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int ar
trap_Cmd_Restart ( 5 ); trap_Cmd_Restart ( 5 );
gametype.roundOver = qtrue; gametype.roundOver = qtrue;
// Give the guy who defused it some props // Give the guy who defused it some props
if ( !gt_simpleScoring.integer ) if ( !gt_simpleScoring.integer )
{ {
trap_Cmd_AddClientScore ( arg1, 10 ); trap_Cmd_AddClientScore ( arg1, 10 );
} }
return 1; return 1;
} }

View file

@ -17,6 +17,7 @@ CFG=gt_dm - Win32 Debug SoF2
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !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 "gt_dm - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE !MESSAGE
@ -26,8 +27,38 @@ CPP=cl.exe
MTL=midl.exe MTL=midl.exe
RSC=rc.exe RSC=rc.exe
!IF "$(CFG)" == "gt_dm - Win32 Debug SoF2" !IF "$(CFG)" == "gt_dm - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_dm_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_dm_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
!ELSEIF "$(CFG)" == "gt_dm - Win32 Debug SoF2"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug SoF2"
# PROP BASE Intermediate_Dir "Debug SoF2"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
# PROP Use_Debug_Libraries 1 # PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\Debug" # PROP Output_Dir "..\..\Debug"
@ -51,6 +82,7 @@ LINK32=link.exe
# Begin Target # Begin Target
# Name "gt_dm - Win32 Debug"
# Name "gt_dm - Win32 Debug SoF2" # Name "gt_dm - Win32 Debug SoF2"
# Begin Group "Source Files" # Begin Group "Source Files"

View file

@ -22,9 +22,9 @@ set cc=..\..\..\..\bin\sof2lcc -A -DQ3_VM -DMISSIONPACK -S -Wf-target=bytecode -
..\..\..\..\bin\sof2asm -f ../gt_elim ..\..\..\..\bin\sof2asm -f ../gt_elim
@if errorlevel 1 goto quit @if errorlevel 1 goto quit
mkdir "..\..\..\..\base\vm" mkdir "..\..\..\Debug\base\MP\vm"
copy *.map "..\..\..\..\base\vm" copy *.map "..\..\..\Debug\base\MP\vm"
copy *.qvm "..\..\..\..\base\vm" copy *.qvm "..\..\..\Debug\base\MP\vm"
:quit :quit
cd .. cd ..

View file

@ -17,6 +17,7 @@ CFG=gt_inf - Win32 Debug SoF2
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !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 "gt_inf - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE !MESSAGE
@ -26,8 +27,38 @@ CPP=cl.exe
MTL=midl.exe MTL=midl.exe
RSC=rc.exe RSC=rc.exe
!IF "$(CFG)" == "gt_inf - Win32 Debug SoF2" !IF "$(CFG)" == "gt_inf - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_inf_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_inf_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
!ELSEIF "$(CFG)" == "gt_inf - Win32 Debug SoF2"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug SoF2"
# PROP BASE Intermediate_Dir "Debug SoF2"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
# PROP Use_Debug_Libraries 1 # PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\Debug" # PROP Output_Dir "..\..\Debug"
@ -51,6 +82,7 @@ LINK32=link.exe
# Begin Target # Begin Target
# Name "gt_inf - Win32 Debug"
# Name "gt_inf - Win32 Debug SoF2" # Name "gt_inf - Win32 Debug SoF2"
# Begin Group "Source Files" # Begin Group "Source Files"

View file

@ -17,6 +17,7 @@ CFG=gt_tdm - Win32 Debug SoF2
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !MESSAGE
!MESSAGE "gt_tdm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "gt_tdm - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "gt_tdm - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE !MESSAGE
@ -26,8 +27,38 @@ CPP=cl.exe
MTL=midl.exe MTL=midl.exe
RSC=rc.exe RSC=rc.exe
!IF "$(CFG)" == "gt_tdm - Win32 Debug SoF2" !IF "$(CFG)" == "gt_tdm - 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_tdm_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_tdm_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_tdm - 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_MFC 0
# PROP Use_Debug_Libraries 1 # PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\Debug" # PROP Output_Dir "..\..\Debug"
@ -51,6 +82,7 @@ LINK32=link.exe
# Begin Target # Begin Target
# Name "gt_tdm - Win32 Debug"
# Name "gt_tdm - Win32 Debug SoF2" # Name "gt_tdm - Win32 Debug SoF2"
# Begin Group "Source Files" # Begin Group "Source Files"

View file

@ -53,6 +53,8 @@ typedef enum {
K_F14, K_F14,
K_F15, K_F15,
K_SCROLL,
K_KP_HOME, K_KP_HOME,
K_KP_UPARROW, K_KP_UPARROW,
K_KP_PGUP, K_KP_PGUP,

View file

@ -1,4 +1,4 @@
# Microsoft Developer Studio Project File - Name="SoF2ui" - Package Owner=<4> # Microsoft Developer Studio Project File - Name="ui" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00 # Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT ** # ** DO NOT EDIT **
@ -13,13 +13,12 @@ CFG=ui - Win32 SH Debug SoF2
!MESSAGE You can specify a configuration when running NMAKE !MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "sof2_ui.mak" CFG="SoF2ui - Win32 SH Debug SoF2" !MESSAGE NMAKE /f "sof2_ui.mak" CFG="ui - Win32 SH Debug SoF2"
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !MESSAGE
!MESSAGE "SoF2ui - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "ui - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "SoF2ui - Win32 Release SoF2" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "ui - Win32 Release SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "SoF2ui - Win32 SH Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE !MESSAGE
# Begin Project # Begin Project
@ -28,12 +27,12 @@ CPP=cl.exe
MTL=midl.exe MTL=midl.exe
RSC=rc.exe RSC=rc.exe
!IF "$(CFG)" == "SoF2ui - Win32 Debug SoF2" !IF "$(CFG)" == "ui - Win32 Debug SoF2"
# PROP BASE Use_MFC 0 # PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1 # PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "SoF2ui___Win32_Debug_SoF2" # PROP BASE Output_Dir "ui___Win32_Debug_SoF2"
# PROP BASE Intermediate_Dir "SoF2ui___Win32_Debug_SoF2" # PROP BASE Intermediate_Dir "ui___Win32_Debug_SoF2"
# PROP BASE Ignore_Export_Lib 0 # PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir "" # PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
@ -57,12 +56,12 @@ LINK32=link.exe
# ADD LINK32 /nologo /base:"0x40000000" /dll /map:"..\Debug\of2mp_uix86.map" /debug /machine:I386 /out:"../Debug/sof2mp_uix86.dll" /pdbtype:sept # ADD LINK32 /nologo /base:"0x40000000" /dll /map:"..\Debug\of2mp_uix86.map" /debug /machine:I386 /out:"../Debug/sof2mp_uix86.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none # SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "SoF2ui - Win32 Release SoF2" !ELSEIF "$(CFG)" == "ui - Win32 Release SoF2"
# PROP BASE Use_MFC 0 # PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0 # PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "SoF2ui___Win32_Release_SoF2" # PROP BASE Output_Dir "ui___Win32_Release_SoF2"
# PROP BASE Intermediate_Dir "SoF2ui___Win32_Release_SoF2" # PROP BASE Intermediate_Dir "ui___Win32_Release_SoF2"
# PROP BASE Ignore_Export_Lib 0 # PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir "" # PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
@ -86,42 +85,12 @@ LINK32=link.exe
# ADD BASE LINK32 /nologo /base:"0x40000000" /dll /map /debug /machine:I386 /out:"../Release JK2/uix86.dll" # ADD BASE LINK32 /nologo /base:"0x40000000" /dll /map /debug /machine:I386 /out:"../Release JK2/uix86.dll"
# ADD LINK32 /nologo /base:"0x40000000" /dll /map:"../Release/sof2mp_uix86.map" /debug /machine:I386 /out:"../Release/sof2mp_uix86.dll" # ADD LINK32 /nologo /base:"0x40000000" /dll /map:"../Release/sof2mp_uix86.map" /debug /machine:I386 /out:"../Release/sof2mp_uix86.dll"
!ELSEIF "$(CFG)" == "SoF2ui - Win32 SH Debug SoF2"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "SoF2ui___Win32_SH_Debug_SoF2"
# PROP BASE Intermediate_Dir "SoF2ui___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 "..\SHDebug\ui"
# PROP Intermediate_Dir "..\SHDebug\ui"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "_USRDLL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "UI_EXPORTS" /D "MISSIONPACK" /D "_SOF2" /FR /YX /FD /GZ /c
# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "_USRDLL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "UI_EXPORTS" /D "MISSIONPACK" /D "_SOF2" /D "MEM_DEBUG" /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_Debug JK2" /mktyplib203 /win32
# ADD MTL /nologo /D "_Debug JK2" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_Debug JK2"
# ADD RSC /l 0x409 /d "_Debug JK2"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /base:"0x40000000" /dll /map:"..\Debug\of2mp_uix86.map" /debug /machine:I386 /out:"../Debug/sof2mp_uix86.dll" /pdbtype:sept
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 /nologo /base:"0x40000000" /dll /map:"..\SHDebug\of2mp_uix86.map" /debug /machine:I386 /out:"../SHDebug/sof2mp_uix86.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF !ENDIF
# Begin Target # Begin Target
# Name "SoF2ui - Win32 Debug SoF2" # Name "ui - Win32 Debug SoF2"
# Name "SoF2ui - Win32 Release SoF2" # Name "ui - Win32 Release SoF2"
# Name "SoF2ui - Win32 SH Debug SoF2"
# Begin Group "Source Files" # Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

View file

@ -742,6 +742,13 @@ void trap_Parental_Update ( void );
void trap_Parental_SetPassword ( const char* password ); void trap_Parental_SetPassword ( const char* password );
void trap_Parental_GetPassword ( char* password, int size ); void trap_Parental_GetPassword ( char* password, int size );
void trap_PunkBuster_Enable ( void );
void trap_PunkBuster_Disable ( void );
int trap_PunkBuster_IsEnabled ( void );
int trap_GetTeamCount ( int team );
int trap_GetTeamScore ( int team );
void trap_Print( const char *string ); void trap_Print( const char *string );
void trap_Error( const char *string ); void trap_Error( const char *string );
int trap_Milliseconds( void ); int trap_Milliseconds( void );

View file

@ -714,6 +714,16 @@ void UI_DrawObjectivePhotos ( rectDef_t *rect, qhandle_t font, float scale, vec4
} }
} }
static void UI_DrawTeamCount ( int team, rectDef_t *rect, qhandle_t font, float scale, vec4_t color )
{
UI_DrawText (rect->x, rect->y, font, scale, color, va("%d",trap_GetTeamCount(team)), 0, 0 );
}
static void UI_DrawTeamScore ( int team, rectDef_t *rect, qhandle_t font, float scale, vec4_t color )
{
UI_DrawText (rect->x, rect->y, font, scale, color, va("%d",trap_GetTeamScore(team)), 0, 0 );
}
// ui_gameType assumes gametype 0 is -1 ALL and will not show // ui_gameType assumes gametype 0 is -1 ALL and will not show
static void UI_DrawGameType(rectDef_t *rect, qhandle_t font, float scale, vec4_t color ) static void UI_DrawGameType(rectDef_t *rect, qhandle_t font, float scale, vec4_t color )
{ {
@ -1447,6 +1457,22 @@ static void UI_OwnerDraw(float x, float y, float w, float h, float text_x, float
switch (ownerDraw) switch (ownerDraw)
{ {
case UI_RED_TEAM_COUNT:
UI_DrawTeamCount ( TEAM_RED, &rect, font, scale, color );
break;
case UI_BLUE_TEAM_COUNT:
UI_DrawTeamCount ( TEAM_BLUE, &rect, font, scale, color );
break;
case UI_RED_TEAM_SCORE:
UI_DrawTeamScore ( TEAM_RED, &rect, font, scale, color );
break;
case UI_BLUE_TEAM_SCORE:
UI_DrawTeamScore ( TEAM_BLUE, &rect, font, scale, color );
break;
case UI_OUTFITTING_SLOT_RENDER: case UI_OUTFITTING_SLOT_RENDER:
UI_DrawOutfittingSlotRender ( &rect, atoi ( param )); UI_DrawOutfittingSlotRender ( &rect, atoi ( param ));
break; break;
@ -2510,6 +2536,8 @@ static void UI_RunMenuScript(const char **args)
else if ( Q_stricmp ( name, "autoTeamJoin" ) == 0 ) else if ( Q_stricmp ( name, "autoTeamJoin" ) == 0 )
{ {
qboolean joinRed = qfalse; qboolean joinRed = qfalse;
int countRed = 0;
int countBlue = 0;
if ( !String_Parse(args, &name) || !name ) if ( !String_Parse(args, &name) || !name )
{ {
@ -2521,18 +2549,21 @@ static void UI_RunMenuScript(const char **args)
return; return;
} }
countRed = trap_GetTeamCount ( TEAM_RED );
countBlue = trap_GetTeamCount ( TEAM_BLUE );
// If the teams have the same number of players then join the // If the teams have the same number of players then join the
// team that has less points // team that has less points
if ( ui_info_bluecount.integer == ui_info_redcount.integer ) if ( countRed == countBlue )
{ {
// If the blue team has more points then join red // If the blue team has more points then join red
if ( ui_info_bluescore.integer > ui_info_redscore.integer ) if ( trap_GetTeamScore ( TEAM_BLUE ) > trap_GetTeamScore ( TEAM_RED ) )
{ {
joinRed = qtrue; joinRed = qtrue;
} }
} }
// If the blue team has more players then join red // If the blue team has more players then join red
else if ( ui_info_bluecount.integer > ui_info_redcount.integer ) else if ( countBlue > countRed )
{ {
joinRed = qtrue; joinRed = qtrue;
} }
@ -2810,10 +2841,29 @@ static void UI_RunMenuScript(const char **args)
} else if (Q_stricmp(name, "RefreshServers") == 0) { } else if (Q_stricmp(name, "RefreshServers") == 0) {
UI_StartServerRefresh(qtrue); UI_StartServerRefresh(qtrue);
UI_BuildServerDisplayList(qtrue); UI_BuildServerDisplayList(qtrue);
} else if (Q_stricmp(name, "RefreshFilter") == 0) { }
else if (Q_stricmp(name, "RefreshFilter") == 0)
{
UI_StartServerRefresh(qfalse); UI_StartServerRefresh(qfalse);
UI_BuildServerDisplayList(qtrue); UI_BuildServerDisplayList(qtrue);
} else if (Q_stricmp(name, "RunSPDemo") == 0) { }
else if (Q_stricmp(name, "updatePunkbuster" ) == 0 )
{
int enabled = (int)trap_Cvar_VariableValue ( "ui_browserPunkbuster" );
if ( enabled )
{
trap_PunkBuster_Enable ( );
}
else
{
trap_PunkBuster_Disable ( );
}
trap_Cvar_Set ( "ui_browserPunkbuster", trap_PunkBuster_IsEnabled ( ) ? "1":"0" );
}
else if (Q_stricmp(name, "RunSPDemo") == 0)
{
if (uiInfo.demoAvailable) { if (uiInfo.demoAvailable) {
trap_Cmd_ExecuteText( EXEC_APPEND, va("demo %s_%s\n", uiInfo.mapList[ui_currentMap.integer].mapLoadName, bg_gametypeData[ui_gameType.integer].name)); trap_Cmd_ExecuteText( EXEC_APPEND, va("demo %s_%s\n", uiInfo.mapList[ui_currentMap.integer].mapLoadName, bg_gametypeData[ui_gameType.integer].name));
} }
@ -2852,7 +2902,11 @@ static void UI_RunMenuScript(const char **args)
uiInfo.serverStatus.nextDisplayRefresh = 0; uiInfo.serverStatus.nextDisplayRefresh = 0;
uiInfo.nextServerStatusRefresh = 0; uiInfo.nextServerStatusRefresh = 0;
uiInfo.nextFindPlayerRefresh = 0; uiInfo.nextFindPlayerRefresh = 0;
} else if (Q_stricmp(name, "UpdateFilter") == 0) { }
else if (Q_stricmp(name, "UpdateFilter") == 0)
{
trap_Cvar_Set ( "ui_browserPunkbuster", trap_PunkBuster_IsEnabled ( ) ? "1" : "0" );
if (ui_netSource.integer == AS_LOCAL) { if (ui_netSource.integer == AS_LOCAL) {
UI_StartServerRefresh(qtrue); UI_StartServerRefresh(qtrue);
} }
@ -3910,7 +3964,7 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan
static char info[MAX_STRING_CHARS]; static char info[MAX_STRING_CHARS];
static char info2[MAX_STRING_CHARS]; static char info2[MAX_STRING_CHARS];
static char hostname[MAX_STRING_CHARS]; static char hostname[MAX_STRING_CHARS];
static char needpass[2]; static char yesno[5];
static char clientBuff[32]; static char clientBuff[32];
static int lastColumn = -1; static int lastColumn = -1;
static int lastTime = 0; static int lastTime = 0;
@ -3974,10 +4028,27 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan
switch (column) switch (column)
{ {
case SORT_PUNKBUSTER:
if ( atoi(Info_ValueForKey(info, "sv_punkbuster")) )
{
strcpy ( yesno, "*" );
}
else
{
strcpy ( yesno, "" );
}
return yesno;
case SORT_NEEDPASS: case SORT_NEEDPASS:
needpass[0] = atoi(Info_ValueForKey(info, "needpass"))?'*':' '; if ( atoi(Info_ValueForKey(info, "needpass")) )
needpass[1] = 0; {
return needpass; strcpy ( yesno, "*" );
}
else
{
strcpy ( yesno, "" );
}
return yesno;
case SORT_HOST : case SORT_HOST :
if (ping <= 0) if (ping <= 0)
@ -4024,11 +4095,11 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan
game = BG_FindGametype ( Info_ValueForKey(info, "gametype") ); game = BG_FindGametype ( Info_ValueForKey(info, "gametype") );
if (ping <= 0) if (ping <= 0)
{ {
return "Inactive"; return "----";
} }
else if (game < 0) else if (game < 0)
{ {
return "Unknown"; return "????";
} }
return bg_gametypeData[game].name; return bg_gametypeData[game].name;
@ -4956,7 +5027,7 @@ void UI_DrawConnectScreen( qboolean overlay ) {
} }
// display global MOTD at bottom // display global MOTD at bottom
Text_PaintCenter(centerPoint, 600, uiInfo.uiDC.Assets.defaultFont, scale, colorWhite, Info_ValueForKey( cstate.updateInfoString, "motd" ), 0 ); Text_PaintCenter(centerPoint, yStart + 13, uiInfo.uiDC.Assets.defaultFont, scale, colorWhite, Info_ValueForKey( cstate.updateInfoString, "motd" ), 0 );
// print any server info (server full, bad version, etc) // print any server info (server full, bad version, etc)
if ( cstate.connState < CA_CONNECTED ) if ( cstate.connState < CA_CONNECTED )
@ -4980,7 +5051,7 @@ void UI_DrawConnectScreen( qboolean overlay ) {
} }
} }
Text_PaintCenter(centerPoint, yStart + 112, uiInfo.uiDC.Assets.defaultFont, scale, colorRed, cstate.messageString, 0 ); Text_PaintCenter(centerPoint, yStart + 112, uiInfo.uiDC.Assets.defaultFont, scale * 0.8f, colorRed, cstate.messageString, 0 );
} }
if ( lastConnState > cstate.connState ) { if ( lastConnState > cstate.connState ) {
@ -5136,6 +5207,7 @@ vmCvar_t ui_info_team;
vmCvar_t ui_info_teamgame; vmCvar_t ui_info_teamgame;
vmCvar_t ui_info_redscore; vmCvar_t ui_info_redscore;
vmCvar_t ui_info_bluescore; vmCvar_t ui_info_bluescore;
vmCvar_t ui_info_showobjectives;
vmCvar_t ui_joinserver; vmCvar_t ui_joinserver;
vmCvar_t ui_allowparental; vmCvar_t ui_allowparental;
@ -5220,6 +5292,7 @@ static cvarTable_t cvarTable[] =
{ &ui_info_redscore, "ui_info_redscore", "0", CVAR_ROM|CVAR_INTERNAL }, { &ui_info_redscore, "ui_info_redscore", "0", CVAR_ROM|CVAR_INTERNAL },
{ &ui_info_bluescore, "ui_info_bluescore", "0", CVAR_ROM|CVAR_INTERNAL }, { &ui_info_bluescore, "ui_info_bluescore", "0", CVAR_ROM|CVAR_INTERNAL },
{ &ui_info_objectives, "ui_info_objectives", "0", CVAR_ROM|CVAR_INTERNAL }, { &ui_info_objectives, "ui_info_objectives", "0", CVAR_ROM|CVAR_INTERNAL },
{ &ui_info_showobjectives, "ui_info_showobjectives", "0", CVAR_ROM|CVAR_INTERNAL },
{ &ui_info_gametype, "ui_info_gametype", "0", CVAR_ROM|CVAR_INTERNAL }, { &ui_info_gametype, "ui_info_gametype", "0", CVAR_ROM|CVAR_INTERNAL },
{ &ui_info_team, "ui_info_team", "0", CVAR_ROM|CVAR_INTERNAL }, { &ui_info_team, "ui_info_team", "0", CVAR_ROM|CVAR_INTERNAL },
{ &ui_info_teamgame, "ui_info_teamgame", "0", CVAR_ROM|CVAR_INTERNAL }, { &ui_info_teamgame, "ui_info_teamgame", "0", CVAR_ROM|CVAR_INTERNAL },

View file

@ -227,6 +227,13 @@ typedef enum
UI_VERSION_GET_SITE, UI_VERSION_GET_SITE,
UI_VERSION_DOWNLOAD, UI_VERSION_DOWNLOAD,
UI_PB_ENABLE,
UI_PB_DISABLE,
UI_PB_ISENABLED,
UI_GET_TEAM_COUNT,
UI_GET_TEAM_SCORE,
} uiImport_t; } uiImport_t;
typedef enum typedef enum
@ -249,6 +256,7 @@ typedef enum
#define SORT_CLIENTS 3 #define SORT_CLIENTS 3
#define SORT_GAME 4 #define SORT_GAME 4
#define SORT_PING 5 #define SORT_PING 5
#define SORT_PUNKBUSTER 6
typedef enum typedef enum
{ {

View file

@ -5306,6 +5306,9 @@ menuDef_t *Menus_ActivateByName(const char *p)
menuDef_t *m = NULL; menuDef_t *m = NULL;
menuDef_t *focus = Menu_GetFocused(); menuDef_t *focus = Menu_GetFocused();
DC->tooltiptime = DC->realTime;
DC->tooltipItem = NULL;
// If we find a match for the window then save the pointer, otherwise // If we find a match for the window then save the pointer, otherwise
// clear the focus of the window since the window we are looking // clear the focus of the window since the window we are looking
// for will get the focus eventually // for will get the focus eventually

View file

@ -148,6 +148,11 @@ equ trap_Version_GetDescription -174 ; UI_VERSION_GET_DESCRIPTION
equ trap_Version_GetNumSites -175 ; UI_VERSION_GET_NUM_SITES equ trap_Version_GetNumSites -175 ; UI_VERSION_GET_NUM_SITES
equ trap_Version_GetSite -176 ; UI_VERSION_GET_SITE equ trap_Version_GetSite -176 ; UI_VERSION_GET_SITE
equ trap_Version_Download -177 ; UI_VERSION_DOWNLOAD equ trap_Version_Download -177 ; UI_VERSION_DOWNLOAD
equ trap_PunkBuster_Enable -178 ; UI_PB_ENABLE
equ trap_PunkBuster_Disable -179 ; UI_PB_DISABLE
equ trap_PunkBuster_IsEnabled -180 ; UI_PB_ISENABLED
equ trap_GetTeamCount -181 ; UI_GET_TEAM_COUNT
equ trap_GetTeamScore -182 ; UI_GET_TEAM_SCORE
; hardcoded functions ; hardcoded functions

View file

@ -699,3 +699,29 @@ void trap_Version_Download(int index)
{ {
syscall(UI_VERSION_DOWNLOAD, index); syscall(UI_VERSION_DOWNLOAD, index);
} }
void trap_PunkBuster_Enable ( void )
{
syscall ( UI_PB_ENABLE );
}
void trap_PunkBuster_Disable ( void )
{
syscall ( UI_PB_DISABLE );
}
int trap_PunkBuster_IsEnabled ( void )
{
return syscall ( UI_PB_ISENABLED );
}
int trap_GetTeamCount ( int team )
{
return syscall ( UI_GET_TEAM_COUNT, team );
}
int trap_GetTeamScore ( int team )
{
return syscall ( UI_GET_TEAM_SCORE, team );
}

View file

@ -11,6 +11,7 @@ bin
sof2map.exe sof2map.exe
sof2data.exe sof2data.exe
striped.exe striped.exe
sof2mpdev.exe
docs docs
Docs for: Docs for:
Vertigons (surface sprites) Vertigons (surface sprites)
@ -29,8 +30,17 @@ resources
Max files for a male figure and the inview hands Max files for a male figure and the inview hands
SDK V1.02 09/24/2002
-----------------------
- Now includes sof2mpdev.exe to allow mod makers to use the cvars that were
removed from 1.02.
- Updated 1.02 source code
SDK V0.02 07/03/2002 SDK V0.02 07/03/2002
----------------------- -----------------------

View file

@ -862,6 +862,44 @@
} }
} }
itemDef
{
name punkbuster_field
group createserver_options
type ITEM_TYPE_YESNO
style WINDOW_STYLE_FILLED
text "PunkBuster:"
cvar "sv_punkbuster"
rect 50 207 210 15
textalign ITEM_ALIGN_RIGHT
textalignx 120
textaligny 0
textfont "hud"
textscale .43
forecolor .12 .14 .08 1
backcolor 0 0 0 0
visible 1
action
{
play "sound/misc/menus/select.wav" ;
}
mouseEnter
{
play "sound/misc/menus/hilite1.wav" ;
setitemcolor punkbuster_field backcolor .12 .14 .08 1
setitemcolor punkbuster_field forecolor .49 .56 .27 1
}
mouseExit
{
setitemcolor punkbuster_field backcolor 0 0 0 0
setitemcolor punkbuster_field forecolor .12 .14 .08 1
}
}
itemDef itemDef
{ {
name dedicated_field name dedicated_field
@ -872,7 +910,7 @@
cvar "ui_dedicated" cvar "ui_dedicated"
cvarFloatList { "No" 0 "LAN" 1 "Internet" 2 } cvarFloatList { "No" 0 "LAN" 1 "Internet" 2 }
rect 50 207 210 15 rect 50 222 210 15
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 120 textalignx 120
textaligny 0 textaligny 0
@ -911,7 +949,7 @@
maxChars 32 maxChars 32
maxPaintChars 22 maxPaintChars 22
cvar "sv_hostname" cvar "sv_hostname"
rect 50 222 325 15 rect 50 237 325 15
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 120 textalignx 120
textaligny 0 textaligny 0
@ -949,7 +987,7 @@
text "Maximum Players:" text "Maximum Players:"
maxChars 2 maxChars 2
cvar "sv_maxclients" cvar "sv_maxclients"
rect 30 237 230 15 rect 30 252 230 15
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 140 textalignx 140
textaligny 0 textaligny 0
@ -987,7 +1025,7 @@
style WINDOW_STYLE_FILLED style WINDOW_STYLE_FILLED
text "Password:" text "Password:"
cvar "g_password" cvar "g_password"
rect 50 252 325 15 rect 50 267 325 15
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 120 textalignx 120
textaligny 0 textaligny 0

View file

@ -341,7 +341,7 @@
visible 1 visible 1
decoration decoration
ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE ownerdrawflag CG_SHOW_HUD_SNIPERCLIP
} }
itemDef itemDef
@ -353,7 +353,7 @@
visible 1 visible 1
decoration decoration
ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE ownerdrawflag CG_SHOW_HUD_SNIPERCLIP
} }
itemDef itemDef
{ {
@ -364,7 +364,7 @@
visible 1 visible 1
decoration decoration
ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE ownerdrawflag CG_SHOW_HUD_SNIPERCLIP
} }
itemDef itemDef
{ {
@ -375,7 +375,7 @@
visible 1 visible 1
decoration decoration
ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE ownerdrawflag CG_SHOW_HUD_SNIPERCLIP
} }
itemDef itemDef
{ {
@ -386,7 +386,7 @@
visible 1 visible 1
decoration decoration
ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE ownerdrawflag CG_SHOW_HUD_SNIPERCLIP
} }
itemDef itemDef
{ {
@ -397,7 +397,7 @@
visible 1 visible 1
decoration decoration
ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE ownerdrawflag CG_SHOW_HUD_SNIPERCLIP
} }
itemDef itemDef
{ {

View file

@ -109,7 +109,7 @@
itemDef itemDef
{ {
name window name window
rect 0 10 300 20 rect 0 0 300 20
name gametypefield name gametypefield
type ITEM_TYPE_EDITFIELD type ITEM_TYPE_EDITFIELD
style 0 style 0
@ -128,7 +128,7 @@
itemDef itemDef
{ {
name window name window
rect 0 25 300 20 rect 0 15 300 20
name gametypefield name gametypefield
type ITEM_TYPE_EDITFIELD type ITEM_TYPE_EDITFIELD
style 0 style 0
@ -148,7 +148,7 @@
{ {
name window name window
type ITEM_TYPE_EDITFIELD type ITEM_TYPE_EDITFIELD
rect 0 40 300 20 rect 0 30 300 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
cvar "ui_about_gametypename" cvar "ui_about_gametypename"
text "GameType:" text "GameType:"
@ -164,7 +164,7 @@
{ {
name window name window
type ITEM_TYPE_EDITFIELD type ITEM_TYPE_EDITFIELD
rect 0 55 300 20 rect 0 45 300 20
maxPaintChars 12 maxPaintChars 12
cvar "ui_about_scorelimit" cvar "ui_about_scorelimit"
text "Score Limit:" text "Score Limit:"
@ -181,7 +181,7 @@
{ {
name window name window
type ITEM_TYPE_EDITFIELD type ITEM_TYPE_EDITFIELD
rect 0 70 300 20 rect 0 60 300 20
maxPaintChars 12 maxPaintChars 12
cvar "ui_about_timelimit" cvar "ui_about_timelimit"
text "Time Limit:" text "Time Limit:"
@ -194,11 +194,45 @@
decoration decoration
} }
itemDef
{
name window
type ITEM_TYPE_YESNO
rect 0 75 300 20
maxPaintChars 12
cvar "ui_about_friendlyfire"
text "Friendly Fire:"
textalign ITEM_ALIGN_RIGHT
textalignx 128
textfont "hud"
textscale .40
forecolor .12 .14 .08 1
visible 1
decoration
}
itemDef
{
name window
type ITEM_TYPE_YESNO
rect 0 90 300 20
maxPaintChars 12
cvar "cl_punkbuster"
text "Punk Buster:"
textalign ITEM_ALIGN_RIGHT
textalignx 128
textfont "hud"
textscale .40
forecolor .12 .14 .08 1
visible 1
decoration
}
itemDef itemDef
{ {
name window name window
type ITEM_TYPE_EDITFIELD type ITEM_TYPE_EDITFIELD
rect 0 95 300 20 rect 0 115 300 20
cvar "protocol" cvar "protocol"
maxPaintChars 12 maxPaintChars 12
text "Protocol:" text "Protocol:"
@ -215,7 +249,7 @@
{ {
name window name window
type ITEM_TYPE_EDITFIELD type ITEM_TYPE_EDITFIELD
rect 0 110 300 20 rect 0 130 300 20
cvar "ui_about_maxclients" cvar "ui_about_maxclients"
maxPaintChars 12 maxPaintChars 12
text "Max Clients:" text "Max Clients:"
@ -232,7 +266,7 @@
{ {
name window name window
type ITEM_TYPE_EDITFIELD type ITEM_TYPE_EDITFIELD
rect 0 125 300 20 rect 0 145 300 20
cvar "ui_about_hostname" cvar "ui_about_hostname"
maxPaintChars 12 maxPaintChars 12
text "Host Name:" text "Host Name:"
@ -248,7 +282,7 @@
itemDef itemDef
{ {
name window name window
rect 0 150 300 20 rect 0 170 300 20
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
cvar "ui_about_needpass" cvar "ui_about_needpass"
text "Password:" text "Password:"
@ -264,7 +298,7 @@
itemDef itemDef
{ {
name window name window
rect 0 165 300 20 rect 0 185 300 20
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
cvar "ui_about_dmflags" cvar "ui_about_dmflags"
text "DM Flags:" text "DM Flags:"
@ -280,7 +314,7 @@
itemDef itemDef
{ {
name window name window
rect 0 180 300 20 rect 0 200 300 20
type ITEM_TYPE_EDITFIELD type ITEM_TYPE_EDITFIELD
cvar "ui_about_seed" cvar "ui_about_seed"
text "RMG Seed:" text "RMG Seed:"
@ -301,29 +335,11 @@
} }
/*
itemDef
{
name window
type ITEM_TYPE_YESNO
rect 0 180 300 20
cvar "bot_minplayers"
text "Bot/Min:"
textalign ITEM_ALIGN_RIGHT
textalignx 128
textfont "hud"
textscale .40
forecolor .12 .14 .08 1
visible 1
decoration
}
*/
itemDef itemDef
{ {
name window name window
type ITEM_TYPE_EDITFIELD type ITEM_TYPE_EDITFIELD
rect 0 205 300 20 rect 0 215 300 20
cvar "version" cvar "version"
maxPaintChars 32 maxPaintChars 32
text "Version:" text "Version:"

View file

@ -299,12 +299,11 @@
border 1 border 1
bordercolor 0 0 0 1 bordercolor 0 0 0 1
cvarTest "ui_about_gametype" cvarTest "ui_info_showobjectives"
disableCvar disableCvar
{ {
"0" ; "0" ;
"1" ;
} }
action action

View file

@ -375,7 +375,7 @@
itemDef itemDef
{ {
rect 410 275 0 0 rect 410 275 0 0
cvar ui_info_redcount ownerdraw UI_RED_TEAM_COUNT
textfont "hud" textfont "hud"
textalign 2 textalign 2
textscale .43 textscale .43
@ -398,7 +398,7 @@
itemDef itemDef
{ {
rect 230 275 0 0 rect 230 275 0 0
cvar ui_info_bluecount ownerdraw UI_BLUE_TEAM_COUNT
textfont "hud" textfont "hud"
textscale .43 textscale .43
forecolor 0 0 0 1 forecolor 0 0 0 1
@ -424,7 +424,7 @@
itemDef itemDef
{ {
rect 410 315 0 0 rect 410 315 0 0
cvar ui_info_redscore ownerdraw UI_RED_TEAM_SCORE
textfont "hud" textfont "hud"
textalign 2 textalign 2
textscale .43 textscale .43
@ -447,7 +447,7 @@
itemDef itemDef
{ {
rect 230 315 0 0 rect 230 315 0 0
cvar ui_info_bluescore ownerdraw UI_BLUE_TEAM_SCORE
textfont "hud" textfont "hud"
textscale .43 textscale .43
forecolor 0 0 0 1 forecolor 0 0 0 1

View file

@ -59,7 +59,7 @@
{ {
name mapname_column name mapname_column
group columns_group group columns_group
rect 245 89 121 170 rect 245 89 101 170
style WINDOW_STYLE_FILLED style WINDOW_STYLE_FILLED
backcolor 0 0 0 0 backcolor 0 0 0 0
visible 1 visible 1
@ -70,7 +70,7 @@
{ {
name players_column name players_column
group columns_group group columns_group
rect 365 89 66 170 rect 345 89 66 170
style WINDOW_STYLE_FILLED style WINDOW_STYLE_FILLED
backcolor 0 0 0 0 backcolor 0 0 0 0
visible 1 visible 1
@ -81,7 +81,7 @@
{ {
name type_column name type_column
group columns_group group columns_group
rect 430 89 51 170 rect 410 89 46 170
style WINDOW_STYLE_FILLED style WINDOW_STYLE_FILLED
backcolor 0 0 0 0 backcolor 0 0 0 0
visible 1 visible 1
@ -92,7 +92,18 @@
{ {
name ping_column name ping_column
group columns_group group columns_group
rect 480 89 59 170 rect 455 89 44 170
style WINDOW_STYLE_FILLED
backcolor 0 0 0 0
visible 1
decoration
}
itemDef
{
name punkbuster_column
group columns_group
rect 497 89 23 170
style WINDOW_STYLE_FILLED style WINDOW_STYLE_FILLED
backcolor 0 0 0 0 backcolor 0 0 0 0
visible 1 visible 1
@ -106,14 +117,14 @@
itemDef itemDef
{ {
name serverlist name serverlist
rect 5 89 533 170 rect 5 89 533 171
type ITEM_TYPE_LISTBOX type ITEM_TYPE_LISTBOX
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
elementwidth 120 elementwidth 120
elementheight 15 elementheight 12
textfont "hud" textfont "hud"
textscale .43 textscale .33
textaligny -13 textaligny -10
elementtype LISTBOX_TEXT elementtype LISTBOX_TEXT
feeder FEEDER_SERVERS feeder FEEDER_SERVERS
border 1 border 1
@ -121,7 +132,7 @@
bordercolor 0 0 0 1 bordercolor 0 0 0 1
outlinecolor .12 .14 .08 1 outlinecolor .12 .14 .08 1
visible 1 visible 1
columns 6 0 3 20 20 40 30 240 40 16 360 5 10 425 20 10 475 20 20 columns 7 0 3 20 20 40 30 240 40 16 340 5 10 405 20 10 450 20 20 490 10 10
doubleClick doubleClick
{ {
@ -325,11 +336,11 @@
name empty_filter name empty_filter
style WINDOW_STYLE_FILLED style WINDOW_STYLE_FILLED
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Empty:" rect 340 9 80 16
text "Empty:"
cvar "ui_browserShowEmpty" cvar "ui_browserShowEmpty"
textfont "hud" textfont "hud"
textscale .43 textscale .43
rect 144 40 80 16
textstyle 0 textstyle 0
textalign ITEM_ALIGN_LEFT textalign ITEM_ALIGN_LEFT
textaligny 0 textaligny 0
@ -364,9 +375,9 @@
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Full:" text "Full:"
cvar "ui_browserShowFull" cvar "ui_browserShowFull"
textfont "hud" textfont "hud"
textscale .43 textscale .43
rect 244 40 80 16 rect 340 24 80 16
textstyle 0 textstyle 0
textalign ITEM_ALIGN_LEFT textalign ITEM_ALIGN_LEFT
textaligny 0 textaligny 0
@ -394,6 +405,43 @@
} }
} }
itemDef
{
name pb_filter
style WINDOW_STYLE_FILLED
type ITEM_TYPE_YESNO
text "PunkBuster Enabled:"
rect 144 40 184 16
textstyle 0
textalign ITEM_ALIGN_LEFT
textaligny 0
textalignx 1
textfont "hud"
textscale .43
forecolor .12 .14 .08 1
backcolor 0 0 0 0
cvar "ui_browserPunkbuster"
visible 1
action
{
uiScript updatePunkbuster ;
play "sound/misc/menus/select.wav" ;
}
mouseEnter
{
play "sound/misc/menus/hilite1.wav" ;
setitemcolor pb_filter backcolor .12 .14 .08 1
setitemcolor pb_filter forecolor .49 .56 .27 1
}
mouseExit
{
setitemcolor pb_filter forecolor .12 .14 .08 1
setitemcolor pb_filter backcolor 0 0 0 0
}
}
itemDef itemDef
{ {
name window name window
@ -654,7 +702,7 @@
style WINDOW_STYLE_FILLED style WINDOW_STYLE_FILLED
textfont "hud" textfont "hud"
textscale .43 textscale .43
rect 365 72 53 18 rect 345 72 53 18
textalign 0 textalign 0
textalignx 2 // center textalignx 2 // center
textaligny 0 textaligny 0
@ -670,7 +718,7 @@
name players_tab_button name players_tab_button
type ITEM_TYPE_BUTTON type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
rect 365 72 53 18 rect 345 72 53 18
visible 1 visible 1
mouseEnter mouseEnter
@ -708,7 +756,7 @@
style WINDOW_STYLE_FILLED style WINDOW_STYLE_FILLED
textfont "hud" textfont "hud"
textscale .43 textscale .43
rect 430 72 39 18 rect 410 72 39 18
textalign 0 textalign 0
textalignx 2 // center textalignx 2 // center
textaligny 0 textaligny 0
@ -724,7 +772,7 @@
name type_tab_button name type_tab_button
type ITEM_TYPE_BUTTON type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
rect 430 72 39 18 rect 410 72 39 18
visible 1 visible 1
mouseEnter mouseEnter
@ -762,7 +810,7 @@
style WINDOW_STYLE_FILLED style WINDOW_STYLE_FILLED
textfont "hud" textfont "hud"
textscale .43 textscale .43
rect 480 72 39 18 rect 455 72 36 18
textalign 0 textalign 0
textalignx 2 // center textalignx 2 // center
textaligny 0 textaligny 0
@ -778,7 +826,7 @@
name ping_tab_button name ping_tab_button
type ITEM_TYPE_BUTTON type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
rect 480 72 39 18 rect 455 72 39 18
visible 1 visible 1
mouseEnter mouseEnter
@ -808,6 +856,74 @@
} }
} }
itemDef
{
name punkbuster_tab
group tabs_group
style WINDOW_STYLE_FILLED
rect 496 72 20 18
textalign 0
textalignx 3
textaligny 0
forecolor .12 .14 .08 1
bordercolor 0 0 0 1
backcolor 0 0 0 0
visible 1
border 1
}
itemDef
{
name punkbuster_tab
group tabs_group
style WINDOW_STYLE_SHADER
background "gfx/menus/icons/icon_punkbuster"
rect 496 72 20 18
textalign 0
textalignx 3
textaligny 0
forecolor .12 .14 .08 1
bordercolor 0 0 0 1
backcolor 0 0 0 0
visible 1
border 1
}
itemDef
{
name punkbuster_tab_button
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
rect 496 72 20 18
visible 1
mouseEnter
{
play "sound/misc/menus/hilite1.wav" ;
setitemcolor punkbuster_tab backcolor .12 .14 .08 1
setitemcolor punkbuster_tab forecolor .49 .56 .27 1
}
mouseExit
{
setitemcolor punkbuster_tab forecolor .12 .14 .08 1
setitemcolor punkbuster_tab backcolor 0 0 0 0
}
action
{
play "sound/misc/menus/select.wav" ;
uiScript ServerSort 6 ;
setitemcolor tabs_group backcolor 0 0 0 0;
setitemcolor tabs_group forecolor .12 .14 .08 1;
setitemcolor punkbuster_tab backcolor .12 .14 .08 1
setitemcolor punkbuster_tab forecolor .49 .56 .27 1
setitemcolor columns_group backcolor 0 0 0 0 ;
setitemcolor punkbuster_column backcolor .12 .14 .08 .35;
}
}
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
// COLUMN BORDERS // COLUMN BORDERS
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
@ -839,7 +955,7 @@
itemDef itemDef
{ {
name column_border name column_border
rect 245 89 121 171 rect 245 89 101 171
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
border 1 border 1
bordersize 1 bordersize 1
@ -851,7 +967,7 @@
itemDef itemDef
{ {
name column_border name column_border
rect 365 89 66 171 rect 345 89 66 171
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
border 1 border 1
bordersize 1 bordersize 1
@ -863,7 +979,7 @@
itemDef itemDef
{ {
name column_border name column_border
rect 430 89 51 171 rect 410 89 46 171
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
border 1 border 1
bordersize 1 bordersize 1
@ -875,7 +991,7 @@
itemDef itemDef
{ {
name column_border name column_border
rect 480 89 59 171 rect 455 89 42 171
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
border 1 border 1
bordersize 1 bordersize 1

View file

@ -86,6 +86,7 @@
#define CG_SHOW_HUD_THERMAL 0x00800000 #define CG_SHOW_HUD_THERMAL 0x00800000
#define CG_SHOW_PLAYER_ALT_WEAPONINFO 0x20000000 #define CG_SHOW_PLAYER_ALT_WEAPONINFO 0x20000000
#define CG_HIDE_PLAYER_ALT_WEAPONINFO 0x40000000 #define CG_HIDE_PLAYER_ALT_WEAPONINFO 0x40000000
#define CG_SHOW_HUD_SNIPERCLIP 0x80000000
#define UI_SHOW_LEADER 0x00000001 #define UI_SHOW_LEADER 0x00000001
@ -185,6 +186,11 @@
#define UI_OBJECTIVE_PHOTOS 275 #define UI_OBJECTIVE_PHOTOS 275
#define UI_RED_TEAM_COUNT 280
#define UI_BLUE_TEAM_COUNT 281
#define UI_RED_TEAM_SCORE 282
#define UI_BLUE_TEAM_SCORE 283
#define VOICECHAT_GETFLAG "getflag" // command someone to get the flag #define VOICECHAT_GETFLAG "getflag" // command someone to get the flag
#define VOICECHAT_OFFENSE "offense" // command someone to go on offense #define VOICECHAT_OFFENSE "offense" // command someone to go on offense
#define VOICECHAT_DEFEND "defend" // command someone to go on defense #define VOICECHAT_DEFEND "defend" // command someone to go on defense

View file

@ -117,7 +117,7 @@
textfont "hud" textfont "hud"
textscale .43 textscale .43
textalign 0 textalign 0
textalignx 20 textalignx 15
textaligny 1 textaligny 1
forecolor .12 .14 .08 1 forecolor .12 .14 .08 1
backcolor 0 0 0 0 backcolor 0 0 0 0
@ -129,8 +129,7 @@
action action
{ {
play "sound/misc/menus/select.wav" ; play "sound/misc/menus/select.wav" ;
close patch_info ; uiScript loadNewVersionFromBrowser ;
open patch_location ;
} }
mouseEnter mouseEnter
@ -147,45 +146,6 @@
} }
} }
itemDef
{
name browser_button
text "Manual Download"
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_FILLED
rect 250 350 120 20
textfont "hud"
textscale .43
textalign 0
textalignx 5
textaligny 1
forecolor .12 .14 .08 1
backcolor 0 0 0 0
visible 1
border 1
bordercolor 0 0 0 1
action
{
play "sound/misc/menus/select.wav" ;
uiScript loadNewVersionFromBrowser ;
}
mouseEnter
{
play "sound/misc/menus/hilite1.wav" ;
setitemcolor browser_button backcolor .12 .14 .08 1
setitemcolor browser_button forecolor .49 .56 .27 1
}
mouseExit
{
setitemcolor browser_button forecolor .12 .14 .08 1
setitemcolor browser_button backcolor 0 0 0 0
}
}
itemDef itemDef
{ {
name ignore_button name ignore_button
@ -196,7 +156,7 @@
textfont "hud" textfont "hud"
textscale .43 textscale .43
textalign 0 textalign 0
textalignx 30 textalignx 25
textaligny 1 textaligny 1
forecolor .12 .14 .08 1 forecolor .12 .14 .08 1
backcolor 0 0 0 0 backcolor 0 0 0 0

View file

@ -9,6 +9,49 @@
rect 50 110 432 254 rect 50 110 432 254
focusColor .49 .56 .27 1 focusColor .49 .56 .27 1
itemDef
{
name teamscores_multi
style WINDOW_STYLE_FILLED
type ITEM_TYPE_MULTI
text "Team Scores:"
cvar "cg_drawteamscores"
rect 50 14 240 15
textalign ITEM_ALIGN_RIGHT
textalignx 125
textaligny 0
textfont "hud"
textscale .43
forecolor .12 .14 .08 1
backcolor 0 0 0 0
visible 1
cvarFloatList
{
"Off" 0
"Bottom Right" 1
"Bottom Center" 2
"Top Right" 3
"Right" 4
"Slim" 5
}
action
{
play "sound/misc/menus/select.wav" ;
}
mouseEnter
{
play "sound/misc/menus/hilite1.wav" ;
setitemcolor teamscores_multi backcolor .12 .14 .08 1
setitemcolor teamscores_multi forecolor .49 .56 .27 1
}
mouseExit
{
setitemcolor teamscores_multi forecolor .12 .14 .08 1
setitemcolor teamscores_multi backcolor 0 0 0 0
}
}
itemDef itemDef
{ {
name autoswitch_multi name autoswitch_multi
@ -16,7 +59,7 @@
type ITEM_TYPE_MULTI type ITEM_TYPE_MULTI
text "Auto Switch:" text "Auto Switch:"
cvar "cg_autoswitch" cvar "cg_autoswitch"
rect 50 19 240 15 rect 50 29 240 15
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 125 textalignx 125
textaligny 0 textaligny 0
@ -56,7 +99,7 @@
type ITEM_TYPE_MULTI type ITEM_TYPE_MULTI
text "Weapon Selection:" text "Weapon Selection:"
cvar "cg_weaponMenuFast" cvar "cg_weaponMenuFast"
rect 50 34 240 15 rect 50 44 240 15
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 125 textalignx 125
textaligny 0 textaligny 0
@ -95,7 +138,7 @@
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Auto Reload:" text "Auto Reload:"
cvar "cg_autoReload" cvar "cg_autoReload"
rect 50 49 240 15 rect 50 59 240 15
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 125 textalignx 125
textaligny 0 textaligny 0
@ -130,7 +173,7 @@
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Defer Players:" text "Defer Players:"
cvar "cg_deferPlayers" cvar "cg_deferPlayers"
rect 50 64 240 15 rect 50 74 240 15
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 125 textalignx 125
textaligny 0 textaligny 0
@ -164,7 +207,7 @@
type ITEM_TYPE_MULTI type ITEM_TYPE_MULTI
text "Identify Target:" text "Identify Target:"
cvar "cg_drawCrosshairNames" cvar "cg_drawCrosshairNames"
rect 50 79 240 15 rect 50 89 240 15
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 125 textalignx 125
textaligny 0 textaligny 0
@ -205,7 +248,7 @@
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Draw Team Icons:" text "Draw Team Icons:"
cvar "cg_drawFriend" cvar "cg_drawFriend"
rect 50 94 240 15 rect 50 104 240 15
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 125 textalignx 125
textaligny 0 textaligny 0
@ -239,7 +282,7 @@
type ITEM_TYPE_MULTI type ITEM_TYPE_MULTI
text "Radar Type:" text "Radar Type:"
cvar "cg_drawRadar" cvar "cg_drawRadar"
rect 50 109 240 15 rect 50 119 240 15
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 125 textalignx 125
textaligny 0 textaligny 0
@ -279,7 +322,7 @@
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Draw HUD Icons:" text "Draw HUD Icons:"
cvar "cg_drawHUDIcons" cvar "cg_drawHUDIcons"
rect 50 124 240 15 rect 50 134 240 15
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 125 textalignx 125
textaligny 0 textaligny 0
@ -311,7 +354,7 @@
name crosshair name crosshair
style WINDOW_STYLE_FILLED style WINDOW_STYLE_FILLED
text "Crosshair:" text "Crosshair:"
rect 50 139 240 30 rect 50 149 240 30
ownerdraw UI_CROSSHAIR ownerdraw UI_CROSSHAIR
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 115 textalignx 115
@ -345,7 +388,7 @@
name brightness_slider name brightness_slider
style WINDOW_STYLE_FILLED style WINDOW_STYLE_FILLED
text "Brightness" text "Brightness"
rect 70 169 140 15 rect 70 179 140 15
forecolor .12 .14 .08 1 forecolor .12 .14 .08 1
backcolor 0 0 0 0 backcolor 0 0 0 0
textaligny 0 textaligny 0
@ -362,7 +405,7 @@
type ITEM_TYPE_SLIDER type ITEM_TYPE_SLIDER
text "" text ""
cvarfloat "r_gamma" 1 0.5 2 cvarfloat "r_gamma" 1 0.5 2
rect 70 184 128 40 rect 70 194 128 40
visible 1 visible 1
action action