私は幻想の中で生きたい
This commit is contained in:
340
COPYING
Normal file
340
COPYING
Normal file
@@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
64
README
Normal file
64
README
Normal file
@@ -0,0 +1,64 @@
|
||||
_______________________________
|
||||
( Welcome to the Illusion Arena )
|
||||
-------------------------------
|
||||
\
|
||||
\
|
||||
\ ,==#@@#m ,##@@=-,
|
||||
\ _% @#,-+%@@**@@%+-,#@ @
|
||||
,@ @ *--- @, ,@ ---* @m
|
||||
@ @ @, ,# # @,
|
||||
% # @, ,@* @ @
|
||||
# %. @ @ % #
|
||||
,@ *@ #@@ @* *,
|
||||
,-* # @ ,__=@=__, @ # ^*=,
|
||||
@ #___---#@** **@#---___# %
|
||||
%, , , , , , , @
|
||||
*-__=*--____=# #-____-*@*____=# %=___=*@*-___-@*__=*
|
||||
@ ,# @ ,# %, @
|
||||
@ _# _-- # ,%--_ #@, ,@
|
||||
#, * @__=%# *=@ %
|
||||
;@ # -=#@*#^^^**= =**^#^**@#=- @ @ #
|
||||
@ %, @ @ @ @ @ @ @ ,% % *@
|
||||
%* *-#- #*^ @ #*^ @ -#-* #,
|
||||
,@ @ @ %* *@ % % %,
|
||||
@ , *, *-_-* *-_-* @* , @
|
||||
@ *% @ # %, %
|
||||
# += #, , , ,@ % #
|
||||
,@, ,##=, ^ ,#@=# ,#m-,
|
||||
,% #,@@ #-, ,=#@ @@@* @
|
||||
@ @#@#, _@ @*#-,_____,-#*@ @ @#@ @
|
||||
*__=#+ %=* # ,* # *=-# #=__%
|
||||
# .@ #,* # # @
|
||||
,* ,@ @ == == @ @ #
|
||||
#--* @ ===== @ *,__%
|
||||
@ ===== @
|
||||
*@, ,@*
|
||||
*#,_,#*
|
||||
|
||||
=== Description ===
|
||||
For now, this is just a fork of OpenArena, version 0.8.8 with some UI/UX changes.
|
||||
In the long term however, my plan for this project is to turn it into a Touhou Project fan game,
|
||||
not unlike Touhou DOOM, running on id Tech 3.
|
||||
|
||||
As for licensing, remains under GPLv2+, although any newer material may or may not use the same license.
|
||||
|
||||
=== Building ===
|
||||
|
||||
# cd game
|
||||
# gmake
|
||||
|
||||
==== Requirements ===
|
||||
* gmake
|
||||
* jpeg
|
||||
* libcurl
|
||||
* ogg
|
||||
* opus
|
||||
* opusfile
|
||||
* SDL2
|
||||
* vorbisfile
|
||||
|
||||
|
||||
=== Roadmap ===
|
||||
- [ ] Maps covering the currently known Touhou locations (Hakurei Shrine, Moriya Shrine, Human Village, Netherworld, Underground, Youkai Mountain)
|
||||
- [ ] Player models, including team-based ones
|
||||
- [ ] More detailed UI/UX changes
|
7
README.oa
Normal file
7
README.oa
Normal file
@@ -0,0 +1,7 @@
|
||||
This is the GPLv2+ source for the game code of OpenArena 0.8.8
|
||||
|
||||
Compiling should be as simple as typing "make" or double clicking the windows scripts.
|
||||
|
||||
This is taken from the oa-0.8.8 branch of http://code.google.com/p/oax/ at revision 295.
|
||||
|
||||
More information can likely be found at http://openarena.ws/board/
|
90
admin.dat
90
admin.dat
@@ -1,45 +1,45 @@
|
||||
[level]
|
||||
level = 0
|
||||
name = ^4Unknown Player
|
||||
flags = iahC
|
||||
|
||||
[level]
|
||||
level = 1
|
||||
name = ^5Server Regular
|
||||
flags = iahC
|
||||
|
||||
[level]
|
||||
level = 2
|
||||
name = ^6Team Manager
|
||||
flags = iahCpP
|
||||
|
||||
[level]
|
||||
level = 3
|
||||
name = ^2Junior Admin
|
||||
flags = iahCpPkm?
|
||||
|
||||
[level]
|
||||
level = 4
|
||||
name = ^3Senior Admin
|
||||
flags = iahCpPkmBbe?
|
||||
|
||||
[level]
|
||||
level = 5
|
||||
name = ^1Server Operator
|
||||
flags = *
|
||||
|
||||
[admin]
|
||||
name = UnnamedPlayer
|
||||
guid =
|
||||
level = 5
|
||||
flags =
|
||||
|
||||
[warning]
|
||||
name = UnnamedPlayer
|
||||
guid =
|
||||
ip = localhost
|
||||
warning = Dumb Move
|
||||
made = 06/11/09 01:23:48
|
||||
expires = 1244701428
|
||||
warner = UnnamedPlayer
|
||||
|
||||
[level]
|
||||
level = 0
|
||||
name = ^4Unknown Player
|
||||
flags = iahC
|
||||
|
||||
[level]
|
||||
level = 1
|
||||
name = ^5Server Regular
|
||||
flags = iahC
|
||||
|
||||
[level]
|
||||
level = 2
|
||||
name = ^6Team Manager
|
||||
flags = iahCpP
|
||||
|
||||
[level]
|
||||
level = 3
|
||||
name = ^2Junior Admin
|
||||
flags = iahCpPkm?
|
||||
|
||||
[level]
|
||||
level = 4
|
||||
name = ^3Senior Admin
|
||||
flags = iahCpPkmBbe?
|
||||
|
||||
[level]
|
||||
level = 5
|
||||
name = ^1Server Operator
|
||||
flags = *
|
||||
|
||||
[admin]
|
||||
name = UnnamedPlayer
|
||||
guid =
|
||||
level = 5
|
||||
flags =
|
||||
|
||||
[warning]
|
||||
name = UnnamedPlayer
|
||||
guid =
|
||||
ip = localhost
|
||||
warning = Dumb Move
|
||||
made = 06/11/09 01:23:48
|
||||
expires = 1244701428
|
||||
warner = UnnamedPlayer
|
||||
|
||||
|
@@ -25,9 +25,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#include "cg_local.h"
|
||||
#include "../ui/ui_shared.h"
|
||||
#ifdef MISSIONPACK
|
||||
extern menuDef_t *menuScoreboard;
|
||||
#endif
|
||||
|
||||
void CG_PrintClientNumbers( void ) {
|
||||
int i;
|
||||
@@ -100,10 +97,6 @@ static void CG_Viewpos_f (void) {
|
||||
|
||||
|
||||
static void CG_ScoresDown_f( void ) {
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
CG_BuildSpectatorString();
|
||||
#endif
|
||||
if ( cg.scoresRequestTime + 2000 < cg.time ) {
|
||||
// the scores are more than two seconds out of data,
|
||||
// so request new ones
|
||||
@@ -155,71 +148,6 @@ static void CG_AccUp_f( void ) {
|
||||
}
|
||||
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
extern menuDef_t *menuScoreboard;
|
||||
void Menu_Reset( void ); // FIXME: add to right include file
|
||||
|
||||
static void CG_LoadHud_f( void) {
|
||||
char buff[1024];
|
||||
const char *hudSet;
|
||||
memset(buff, 0, sizeof(buff));
|
||||
|
||||
String_Init();
|
||||
Menu_Reset();
|
||||
|
||||
trap_Cvar_VariableStringBuffer("cg_hudFiles", buff, sizeof(buff));
|
||||
hudSet = buff;
|
||||
if (hudSet[0] == '\0') {
|
||||
hudSet = "ui/hud.txt";
|
||||
}
|
||||
|
||||
CG_LoadMenus(hudSet);
|
||||
menuScoreboard = NULL;
|
||||
}
|
||||
|
||||
|
||||
static void CG_scrollScoresDown_f( void) {
|
||||
if (menuScoreboard && cg.scoreBoardShowing) {
|
||||
Menu_ScrollFeeder(menuScoreboard, FEEDER_SCOREBOARD, qtrue);
|
||||
Menu_ScrollFeeder(menuScoreboard, FEEDER_REDTEAM_LIST, qtrue);
|
||||
Menu_ScrollFeeder(menuScoreboard, FEEDER_BLUETEAM_LIST, qtrue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void CG_scrollScoresUp_f( void) {
|
||||
if (menuScoreboard && cg.scoreBoardShowing) {
|
||||
Menu_ScrollFeeder(menuScoreboard, FEEDER_SCOREBOARD, qfalse);
|
||||
Menu_ScrollFeeder(menuScoreboard, FEEDER_REDTEAM_LIST, qfalse);
|
||||
Menu_ScrollFeeder(menuScoreboard, FEEDER_BLUETEAM_LIST, qfalse);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void CG_spWin_f( void) {
|
||||
trap_Cvar_Set("cg_cameraOrbit", "2");
|
||||
trap_Cvar_Set("cg_cameraOrbitDelay", "35");
|
||||
trap_Cvar_Set("cg_thirdPerson", "1");
|
||||
trap_Cvar_Set("cg_thirdPersonAngle", "0");
|
||||
trap_Cvar_Set("cg_thirdPersonRange", "100");
|
||||
CG_AddBufferedSound(cgs.media.winnerSound);
|
||||
//trap_S_StartLocalSound(cgs.media.winnerSound, CHAN_ANNOUNCER);
|
||||
CG_CenterPrint("YOU WIN!", SCREEN_HEIGHT * .30, 0);
|
||||
}
|
||||
|
||||
static void CG_spLose_f( void) {
|
||||
trap_Cvar_Set("cg_cameraOrbit", "2");
|
||||
trap_Cvar_Set("cg_cameraOrbitDelay", "35");
|
||||
trap_Cvar_Set("cg_thirdPerson", "1");
|
||||
trap_Cvar_Set("cg_thirdPersonAngle", "0");
|
||||
trap_Cvar_Set("cg_thirdPersonRange", "100");
|
||||
CG_AddBufferedSound(cgs.media.loserSound);
|
||||
//trap_S_StartLocalSound(cgs.media.loserSound, CHAN_ANNOUNCER);
|
||||
CG_CenterPrint("YOU LOSE...", SCREEN_HEIGHT * .30, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void CG_TellTarget_f( void ) {
|
||||
int clientNum;
|
||||
char command[128];
|
||||
@@ -250,203 +178,6 @@ static void CG_TellAttacker_f( void ) {
|
||||
trap_SendClientCommand( command );
|
||||
}
|
||||
|
||||
static void CG_VoiceTellTarget_f( void ) {
|
||||
int clientNum;
|
||||
char command[128];
|
||||
char message[128];
|
||||
|
||||
clientNum = CG_CrosshairPlayer();
|
||||
if ( clientNum == -1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
trap_Args( message, 128 );
|
||||
Com_sprintf( command, 128, "vtell %i %s", clientNum, message );
|
||||
trap_SendClientCommand( command );
|
||||
}
|
||||
|
||||
static void CG_VoiceTellAttacker_f( void ) {
|
||||
int clientNum;
|
||||
char command[128];
|
||||
char message[128];
|
||||
|
||||
clientNum = CG_LastAttacker();
|
||||
if ( clientNum == -1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
trap_Args( message, 128 );
|
||||
Com_sprintf( command, 128, "vtell %i %s", clientNum, message );
|
||||
trap_SendClientCommand( command );
|
||||
}
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
static void CG_NextTeamMember_f( void ) {
|
||||
CG_SelectNextPlayer();
|
||||
}
|
||||
|
||||
static void CG_PrevTeamMember_f( void ) {
|
||||
CG_SelectPrevPlayer();
|
||||
}
|
||||
|
||||
// ASS U ME's enumeration order as far as task specific orders, OFFENSE is zero, CAMP is last
|
||||
//
|
||||
static void CG_NextOrder_f( void ) {
|
||||
clientInfo_t *ci = cgs.clientinfo + cg.snap->ps.clientNum;
|
||||
if (ci) {
|
||||
if (!ci->teamLeader && sortedTeamPlayers[cg_currentSelectedPlayer.integer] != cg.snap->ps.clientNum) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (cgs.currentOrder < TEAMTASK_CAMP) {
|
||||
cgs.currentOrder++;
|
||||
|
||||
if (cgs.currentOrder == TEAMTASK_RETRIEVE) {
|
||||
if (!CG_OtherTeamHasFlag()) {
|
||||
cgs.currentOrder++;
|
||||
}
|
||||
}
|
||||
|
||||
if (cgs.currentOrder == TEAMTASK_ESCORT) {
|
||||
if (!CG_YourTeamHasFlag()) {
|
||||
cgs.currentOrder++;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
cgs.currentOrder = TEAMTASK_OFFENSE;
|
||||
}
|
||||
cgs.orderPending = qtrue;
|
||||
cgs.orderTime = cg.time + 3000;
|
||||
}
|
||||
|
||||
|
||||
static void CG_ConfirmOrder_f (void ) {
|
||||
trap_SendConsoleCommand(va("cmd vtell %d %s\n", cgs.acceptLeader, VOICECHAT_YES));
|
||||
trap_SendConsoleCommand("+button5; wait; -button5");
|
||||
if (cg.time < cgs.acceptOrderTime) {
|
||||
trap_SendClientCommand(va("teamtask %d\n", cgs.acceptTask));
|
||||
cgs.acceptOrderTime = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void CG_DenyOrder_f (void ) {
|
||||
trap_SendConsoleCommand(va("cmd vtell %d %s\n", cgs.acceptLeader, VOICECHAT_NO));
|
||||
trap_SendConsoleCommand("+button6; wait; -button6");
|
||||
if (cg.time < cgs.acceptOrderTime) {
|
||||
cgs.acceptOrderTime = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void CG_TaskOffense_f (void ) {
|
||||
if (cgs.gametype == GT_CTF || cgs.gametype == GT_CTF_ELIMINATION || cgs.gametype == GT_1FCTF) {
|
||||
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONGETFLAG));
|
||||
} else {
|
||||
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONOFFENSE));
|
||||
}
|
||||
trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_OFFENSE));
|
||||
}
|
||||
|
||||
static void CG_TaskDefense_f (void ) {
|
||||
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONDEFENSE));
|
||||
trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_DEFENSE));
|
||||
}
|
||||
|
||||
static void CG_TaskPatrol_f (void ) {
|
||||
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONPATROL));
|
||||
trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_PATROL));
|
||||
}
|
||||
|
||||
static void CG_TaskCamp_f (void ) {
|
||||
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONCAMPING));
|
||||
trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_CAMP));
|
||||
}
|
||||
|
||||
static void CG_TaskFollow_f (void ) {
|
||||
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONFOLLOW));
|
||||
trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_FOLLOW));
|
||||
}
|
||||
|
||||
static void CG_TaskRetrieve_f (void ) {
|
||||
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONRETURNFLAG));
|
||||
trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_RETRIEVE));
|
||||
}
|
||||
|
||||
static void CG_TaskEscort_f (void ) {
|
||||
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_ONFOLLOWCARRIER));
|
||||
trap_SendClientCommand(va("teamtask %d\n", TEAMTASK_ESCORT));
|
||||
}
|
||||
|
||||
static void CG_TaskOwnFlag_f (void ) {
|
||||
trap_SendConsoleCommand(va("cmd vsay_team %s\n", VOICECHAT_IHAVEFLAG));
|
||||
}
|
||||
|
||||
static void CG_TauntKillInsult_f (void ) {
|
||||
trap_SendConsoleCommand("cmd vsay kill_insult\n");
|
||||
}
|
||||
|
||||
static void CG_TauntPraise_f (void ) {
|
||||
trap_SendConsoleCommand("cmd vsay praise\n");
|
||||
}
|
||||
|
||||
static void CG_TauntTaunt_f (void ) {
|
||||
trap_SendConsoleCommand("cmd vtaunt\n");
|
||||
}
|
||||
|
||||
static void CG_TauntDeathInsult_f (void ) {
|
||||
trap_SendConsoleCommand("cmd vsay death_insult\n");
|
||||
}
|
||||
|
||||
static void CG_TauntGauntlet_f (void ) {
|
||||
trap_SendConsoleCommand("cmd vsay kill_guantlet\n");
|
||||
}
|
||||
|
||||
static void CG_TaskSuicide_f (void ) {
|
||||
int clientNum;
|
||||
char command[128];
|
||||
|
||||
clientNum = CG_CrosshairPlayer();
|
||||
if ( clientNum == -1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
Com_sprintf( command, 128, "tell %i suicide", clientNum );
|
||||
trap_SendClientCommand( command );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
==================
|
||||
CG_TeamMenu_f
|
||||
==================
|
||||
*/
|
||||
/*
|
||||
static void CG_TeamMenu_f( void ) {
|
||||
if (trap_Key_GetCatcher() & KEYCATCH_CGAME) {
|
||||
CG_EventHandling(CGAME_EVENT_NONE);
|
||||
trap_Key_SetCatcher(0);
|
||||
} else {
|
||||
CG_EventHandling(CGAME_EVENT_TEAMMENU);
|
||||
//trap_Key_SetCatcher(KEYCATCH_CGAME);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
==================
|
||||
CG_EditHud_f
|
||||
==================
|
||||
*/
|
||||
/*
|
||||
static void CG_EditHud_f( void ) {
|
||||
//cls.keyCatchers ^= KEYCATCH_CGAME;
|
||||
//VM_Call (cgvm, CG_EVENT_HANDLING, (cls.keyCatchers & KEYCATCH_CGAME) ? CGAME_EVENT_EDITHUD : CGAME_EVENT_NONE);
|
||||
}
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
==================
|
||||
CG_StartOrbit_f
|
||||
@@ -509,35 +240,7 @@ static consoleCommand_t commands[] = {
|
||||
{ "weapon", CG_Weapon_f },
|
||||
{ "tell_target", CG_TellTarget_f },
|
||||
{ "tell_attacker", CG_TellAttacker_f },
|
||||
{ "vtell_target", CG_VoiceTellTarget_f },
|
||||
{ "vtell_attacker", CG_VoiceTellAttacker_f },
|
||||
{ "tcmd", CG_TargetCommand_f },
|
||||
#ifdef MISSIONPACK
|
||||
{ "loadhud", CG_LoadHud_f },
|
||||
{ "nextTeamMember", CG_NextTeamMember_f },
|
||||
{ "prevTeamMember", CG_PrevTeamMember_f },
|
||||
{ "nextOrder", CG_NextOrder_f },
|
||||
{ "confirmOrder", CG_ConfirmOrder_f },
|
||||
{ "denyOrder", CG_DenyOrder_f },
|
||||
{ "taskOffense", CG_TaskOffense_f },
|
||||
{ "taskDefense", CG_TaskDefense_f },
|
||||
{ "taskPatrol", CG_TaskPatrol_f },
|
||||
{ "taskCamp", CG_TaskCamp_f },
|
||||
{ "taskFollow", CG_TaskFollow_f },
|
||||
{ "taskRetrieve", CG_TaskRetrieve_f },
|
||||
{ "taskEscort", CG_TaskEscort_f },
|
||||
{ "taskSuicide", CG_TaskSuicide_f },
|
||||
{ "taskOwnFlag", CG_TaskOwnFlag_f },
|
||||
{ "tauntKillInsult", CG_TauntKillInsult_f },
|
||||
{ "tauntPraise", CG_TauntPraise_f },
|
||||
{ "tauntTaunt", CG_TauntTaunt_f },
|
||||
{ "tauntDeathInsult", CG_TauntDeathInsult_f },
|
||||
{ "tauntGauntlet", CG_TauntGauntlet_f },
|
||||
{ "spWin", CG_spWin_f },
|
||||
{ "spLose", CG_spLose_f },
|
||||
{ "scoresDown", CG_scrollScoresDown_f },
|
||||
{ "scoresUp", CG_scrollScoresUp_f },
|
||||
#endif
|
||||
{ "startOrbit", CG_StartOrbit_f },
|
||||
// { "camera", CG_Camera_f },
|
||||
{ "loaddeferred", CG_LoadDeferredPlayers },
|
||||
@@ -595,13 +298,6 @@ void CG_InitConsoleCommands( void ) {
|
||||
trap_AddCommand ("say");
|
||||
trap_AddCommand ("say_team");
|
||||
trap_AddCommand ("tell");
|
||||
trap_AddCommand ("vsay");
|
||||
trap_AddCommand ("vsay_team");
|
||||
trap_AddCommand ("vtell");
|
||||
trap_AddCommand ("vtaunt");
|
||||
trap_AddCommand ("vosay");
|
||||
trap_AddCommand ("vosay_team");
|
||||
trap_AddCommand ("votell");
|
||||
trap_AddCommand ("give");
|
||||
trap_AddCommand ("god");
|
||||
trap_AddCommand ("notarget");
|
||||
|
@@ -25,15 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#include "cg_local.h"
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
#include "../ui/ui_shared.h"
|
||||
|
||||
// used for scoreboard
|
||||
extern displayContextDef_t cgDC;
|
||||
menuDef_t *menuScoreboard = NULL;
|
||||
#else
|
||||
int drawTeamOverlayModificationCount = -1;
|
||||
#endif
|
||||
|
||||
int sortedTeamPlayers[TEAM_MAXOVERLAY];
|
||||
int numSortedTeamPlayers;
|
||||
@@ -42,165 +34,6 @@ char systemChat[256];
|
||||
char teamChat1[256];
|
||||
char teamChat2[256];
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
|
||||
int CG_Text_Width(const char *text, float scale, int limit) {
|
||||
int count,len;
|
||||
float out;
|
||||
glyphInfo_t *glyph;
|
||||
float useScale;
|
||||
// FIXME: see ui_main.c, same problem
|
||||
// const unsigned char *s = text;
|
||||
const char *s = text;
|
||||
fontInfo_t *font = &cgDC.Assets.textFont;
|
||||
if (scale <= cg_smallFont.value) {
|
||||
font = &cgDC.Assets.smallFont;
|
||||
} else if (scale > cg_bigFont.value) {
|
||||
font = &cgDC.Assets.bigFont;
|
||||
}
|
||||
useScale = scale * font->glyphScale;
|
||||
out = 0;
|
||||
if (text) {
|
||||
len = strlen(text);
|
||||
if (limit > 0 && len > limit) {
|
||||
len = limit;
|
||||
}
|
||||
count = 0;
|
||||
while (s && *s && count < len) {
|
||||
if ( Q_IsColorString(s) ) {
|
||||
s += 2;
|
||||
continue;
|
||||
} else {
|
||||
glyph = &font->glyphs[(int)*s]; // TTimo: FIXME: getting nasty warnings without the cast, hopefully this doesn't break the VM build
|
||||
out += glyph->xSkip;
|
||||
s++;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return out * useScale;
|
||||
}
|
||||
|
||||
int CG_Text_Height(const char *text, float scale, int limit) {
|
||||
int len, count;
|
||||
float max;
|
||||
glyphInfo_t *glyph;
|
||||
float useScale;
|
||||
// TTimo: FIXME
|
||||
// const unsigned char *s = text;
|
||||
const char *s = text;
|
||||
fontInfo_t *font = &cgDC.Assets.textFont;
|
||||
if (scale <= cg_smallFont.value) {
|
||||
font = &cgDC.Assets.smallFont;
|
||||
} else if (scale > cg_bigFont.value) {
|
||||
font = &cgDC.Assets.bigFont;
|
||||
}
|
||||
useScale = scale * font->glyphScale;
|
||||
max = 0;
|
||||
if (text) {
|
||||
len = strlen(text);
|
||||
if (limit > 0 && len > limit) {
|
||||
len = limit;
|
||||
}
|
||||
count = 0;
|
||||
while (s && *s && count < len) {
|
||||
if ( Q_IsColorString(s) ) {
|
||||
s += 2;
|
||||
continue;
|
||||
} else {
|
||||
glyph = &font->glyphs[(int)*s]; // TTimo: FIXME: getting nasty warnings without the cast, hopefully this doesn't break the VM build
|
||||
if (max < glyph->height) {
|
||||
max = glyph->height;
|
||||
}
|
||||
s++;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return max * useScale;
|
||||
}
|
||||
|
||||
void CG_Text_PaintChar(float x, float y, float width, float height, float scale, float s, float t, float s2, float t2, qhandle_t hShader) {
|
||||
float w, h;
|
||||
w = width * scale;
|
||||
h = height * scale;
|
||||
CG_AdjustFrom640( &x, &y, &w, &h );
|
||||
trap_R_DrawStretchPic( x, y, w, h, s, t, s2, t2, hShader );
|
||||
}
|
||||
|
||||
void CG_Text_Paint(float x, float y, float scale, vec4_t color, const char *text, float adjust, int limit, int style) {
|
||||
int len, count;
|
||||
vec4_t newColor;
|
||||
glyphInfo_t *glyph;
|
||||
float useScale;
|
||||
fontInfo_t *font = &cgDC.Assets.textFont;
|
||||
if (scale <= cg_smallFont.value) {
|
||||
font = &cgDC.Assets.smallFont;
|
||||
} else if (scale > cg_bigFont.value) {
|
||||
font = &cgDC.Assets.bigFont;
|
||||
}
|
||||
useScale = scale * font->glyphScale;
|
||||
if (text) {
|
||||
// TTimo: FIXME
|
||||
// const unsigned char *s = text;
|
||||
const char *s = text;
|
||||
trap_R_SetColor( color );
|
||||
memcpy(&newColor[0], &color[0], sizeof(vec4_t));
|
||||
len = strlen(text);
|
||||
if (limit > 0 && len > limit) {
|
||||
len = limit;
|
||||
}
|
||||
count = 0;
|
||||
while (s && *s && count < len) {
|
||||
glyph = &font->glyphs[(int)*s]; // TTimo: FIXME: getting nasty warnings without the cast, hopefully this doesn't break the VM build
|
||||
//int yadj = Assets.textFont.glyphs[text[i]].bottom + Assets.textFont.glyphs[text[i]].top;
|
||||
//float yadj = scale * (Assets.textFont.glyphs[text[i]].imageHeight - Assets.textFont.glyphs[text[i]].height);
|
||||
if ( Q_IsColorString( s ) ) {
|
||||
memcpy( newColor, g_color_table[ColorIndex(*(s+1))], sizeof( newColor ) );
|
||||
newColor[3] = color[3];
|
||||
trap_R_SetColor( newColor );
|
||||
s += 2;
|
||||
continue;
|
||||
} else {
|
||||
float yadj = useScale * glyph->top;
|
||||
if (style == ITEM_TEXTSTYLE_SHADOWED || style == ITEM_TEXTSTYLE_SHADOWEDMORE) {
|
||||
int ofs = style == ITEM_TEXTSTYLE_SHADOWED ? 1 : 2;
|
||||
colorBlack[3] = newColor[3];
|
||||
trap_R_SetColor( colorBlack );
|
||||
CG_Text_PaintChar(x + ofs, y - yadj + ofs,
|
||||
glyph->imageWidth,
|
||||
glyph->imageHeight,
|
||||
useScale,
|
||||
glyph->s,
|
||||
glyph->t,
|
||||
glyph->s2,
|
||||
glyph->t2,
|
||||
glyph->glyph);
|
||||
colorBlack[3] = 1.0;
|
||||
trap_R_SetColor( newColor );
|
||||
}
|
||||
CG_Text_PaintChar(x, y - yadj,
|
||||
glyph->imageWidth,
|
||||
glyph->imageHeight,
|
||||
useScale,
|
||||
glyph->s,
|
||||
glyph->t,
|
||||
glyph->s2,
|
||||
glyph->t2,
|
||||
glyph->glyph);
|
||||
// CG_DrawPic(x, y - yadj, scale * cgDC.Assets.textFont.glyphs[text[i]].imageWidth, scale * cgDC.Assets.textFont.glyphs[text[i]].imageHeight, cgDC.Assets.textFont.glyphs[text[i]].glyph);
|
||||
x += (glyph->xSkip * useScale) + adjust;
|
||||
s++;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
trap_R_SetColor( NULL );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
==============
|
||||
CG_DrawField
|
||||
@@ -208,7 +41,6 @@ CG_DrawField
|
||||
Draws large numbers for status bar and powerups
|
||||
==============
|
||||
*/
|
||||
#ifndef MISSIONPACK
|
||||
static void CG_DrawField (int x, int y, int width, int value) {
|
||||
char num[16], *ptr;
|
||||
int l;
|
||||
@@ -262,7 +94,6 @@ static void CG_DrawField (int x, int y, int width, int value) {
|
||||
l--;
|
||||
}
|
||||
}
|
||||
#endif // MISSIONPACK
|
||||
|
||||
/*
|
||||
================
|
||||
@@ -438,7 +269,6 @@ CG_DrawStatusBarHead
|
||||
|
||||
================
|
||||
*/
|
||||
#ifndef MISSIONPACK
|
||||
|
||||
static void CG_DrawStatusBarHead( float x ) {
|
||||
vec3_t angles;
|
||||
@@ -490,7 +320,6 @@ static void CG_DrawStatusBarHead( float x ) {
|
||||
CG_DrawHead( x, 480 - size, size, size,
|
||||
cg.snap->ps.clientNum, angles );
|
||||
}
|
||||
#endif // MISSIONPACK
|
||||
|
||||
/*
|
||||
================
|
||||
@@ -498,11 +327,9 @@ CG_DrawStatusBarFlag
|
||||
|
||||
================
|
||||
*/
|
||||
#ifndef MISSIONPACK
|
||||
static void CG_DrawStatusBarFlag( float x, int team ) {
|
||||
CG_DrawFlagModel( x, 480 - ICON_SIZE, ICON_SIZE, ICON_SIZE, team, qfalse );
|
||||
}
|
||||
#endif // MISSIONPACK
|
||||
|
||||
/*
|
||||
================
|
||||
@@ -537,7 +364,6 @@ CG_DrawStatusBar
|
||||
|
||||
================
|
||||
*/
|
||||
#ifndef MISSIONPACK
|
||||
static void CG_DrawStatusBar( void ) {
|
||||
int color;
|
||||
centity_t *cent;
|
||||
@@ -704,7 +530,6 @@ static void CG_DrawStatusBar( void ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
===========================================================================================
|
||||
@@ -995,11 +820,11 @@ static float CG_DrawCTFoneway( float y ) {
|
||||
} else
|
||||
if(cgs.attackingTeam == TEAM_BLUE) {
|
||||
memcpy(color,g_color_table[ColorIndex(COLOR_BLUE)],sizeof(color));
|
||||
s = va("Blue team on offence");
|
||||
s = va("Blue team is at the offensive");
|
||||
} else
|
||||
if(cgs.attackingTeam == TEAM_RED) {
|
||||
memcpy(color,g_color_table[ColorIndex(COLOR_RED)],sizeof(color));
|
||||
s = va("Red team on offence");
|
||||
s = va("Red team is at the offensive");
|
||||
} else
|
||||
s = va("Unknown team on offence");
|
||||
|
||||
@@ -1147,15 +972,10 @@ Lots of stuff
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
//w = CG_Text_Width(s, scale, 0);
|
||||
//CG_Text_Paint(320 - w / 2, 125, scale, colorWhite, st, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE);
|
||||
#else
|
||||
|
||||
w = CG_DrawStrlen( st );
|
||||
CG_DrawStringExt( 320 - w * cw/2, 70, st, colorWhite,
|
||||
qfalse, qtrue, cw, (int)(cw * 1.5), 0 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
Lots of stuff
|
||||
@@ -1441,7 +1261,6 @@ CG_DrawScores
|
||||
Draw the small two score display
|
||||
=================
|
||||
*/
|
||||
#ifndef MISSIONPACK
|
||||
static float CG_DrawScores( float y ) {
|
||||
const char *s;
|
||||
int s1, s2, score;
|
||||
@@ -1627,14 +1446,12 @@ static float CG_DrawScores( float y ) {
|
||||
|
||||
return y1 - 8;
|
||||
}
|
||||
#endif // MISSIONPACK
|
||||
|
||||
/*
|
||||
================
|
||||
CG_DrawPowerups
|
||||
================
|
||||
*/
|
||||
#ifndef MISSIONPACK
|
||||
static float CG_DrawPowerups( float y ) {
|
||||
int sorted[MAX_POWERUPS];
|
||||
int sortedTime[MAX_POWERUPS];
|
||||
@@ -1732,7 +1549,6 @@ static float CG_DrawPowerups( float y ) {
|
||||
|
||||
return y;
|
||||
}
|
||||
#endif // MISSIONPACK
|
||||
|
||||
/*
|
||||
=====================
|
||||
@@ -1740,7 +1556,6 @@ CG_DrawLowerRight
|
||||
|
||||
=====================
|
||||
*/
|
||||
#ifndef MISSIONPACK
|
||||
static void CG_DrawLowerRight( void ) {
|
||||
float y;
|
||||
|
||||
@@ -1753,14 +1568,12 @@ static void CG_DrawLowerRight( void ) {
|
||||
y = CG_DrawScores( y );
|
||||
y = CG_DrawPowerups( y );
|
||||
}
|
||||
#endif // MISSIONPACK
|
||||
|
||||
/*
|
||||
===================
|
||||
CG_DrawPickupItem
|
||||
===================
|
||||
*/
|
||||
#ifndef MISSIONPACK
|
||||
static int CG_DrawPickupItem( int y ) {
|
||||
int value;
|
||||
float *fadeColor;
|
||||
@@ -1785,7 +1598,6 @@ static int CG_DrawPickupItem( int y ) {
|
||||
|
||||
return y;
|
||||
}
|
||||
#endif // MISSIONPACK
|
||||
|
||||
/*
|
||||
=====================
|
||||
@@ -1793,7 +1605,6 @@ CG_DrawLowerLeft
|
||||
|
||||
=====================
|
||||
*/
|
||||
#ifndef MISSIONPACK
|
||||
static void CG_DrawLowerLeft( void ) {
|
||||
float y;
|
||||
|
||||
@@ -1806,7 +1617,6 @@ static void CG_DrawLowerLeft( void ) {
|
||||
|
||||
y = CG_DrawPickupItem( y );
|
||||
}
|
||||
#endif // MISSIONPACK
|
||||
|
||||
|
||||
//===========================================================================================
|
||||
@@ -1816,7 +1626,6 @@ static void CG_DrawLowerLeft( void ) {
|
||||
CG_DrawTeamInfo
|
||||
=================
|
||||
*/
|
||||
#ifndef MISSIONPACK
|
||||
static void CG_DrawTeamInfo( void ) {
|
||||
int w, h;
|
||||
int i, len;
|
||||
@@ -1882,14 +1691,12 @@ static void CG_DrawTeamInfo( void ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // MISSIONPACK
|
||||
|
||||
/*
|
||||
===================
|
||||
CG_DrawHoldableItem
|
||||
===================
|
||||
*/
|
||||
#ifndef MISSIONPACK
|
||||
static void CG_DrawHoldableItem( void ) {
|
||||
int value;
|
||||
|
||||
@@ -1900,9 +1707,7 @@ static void CG_DrawHoldableItem( void ) {
|
||||
}
|
||||
|
||||
}
|
||||
#endif // MISSIONPACK
|
||||
|
||||
#ifndef MISSIONPACK
|
||||
/*
|
||||
===================
|
||||
CG_DrawPersistantPowerup
|
||||
@@ -1919,7 +1724,6 @@ static void CG_DrawPersistantPowerup( void ) {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // MISSIONPACK
|
||||
|
||||
|
||||
/*
|
||||
@@ -2120,13 +1924,8 @@ static void CG_DrawLagometer( void ) {
|
||||
//
|
||||
// draw the graph
|
||||
//
|
||||
#ifdef MISSIONPACK
|
||||
x = 640 - 48;
|
||||
y = 480 - 144;
|
||||
#else
|
||||
x = 640 - 48;
|
||||
y = 480 - 48;
|
||||
#endif
|
||||
|
||||
trap_R_SetColor( NULL );
|
||||
CG_DrawPic( x, y, 48, 48, cgs.media.lagometerShader );
|
||||
@@ -2260,9 +2059,6 @@ static void CG_DrawCenterString( void ) {
|
||||
char *start;
|
||||
int l;
|
||||
int x, y, w;
|
||||
#ifdef MISSIONPACK // bk010221 - unused else
|
||||
int h;
|
||||
#endif
|
||||
float *color;
|
||||
|
||||
if ( !cg.centerPrintTime ) {
|
||||
@@ -2291,13 +2087,6 @@ static void CG_DrawCenterString( void ) {
|
||||
}
|
||||
linebuffer[l] = 0;
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
w = CG_Text_Width(linebuffer, 0.5, 0);
|
||||
h = CG_Text_Height(linebuffer, 0.5, 0);
|
||||
x = (SCREEN_WIDTH - w) / 2;
|
||||
CG_Text_Paint(x, y + h, 0.5, color, linebuffer, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE);
|
||||
y += h + 6;
|
||||
#else
|
||||
w = cg.centerPrintCharWidth * CG_DrawStrlen( linebuffer );
|
||||
|
||||
x = ( SCREEN_WIDTH - w ) / 2;
|
||||
@@ -2306,7 +2095,6 @@ static void CG_DrawCenterString( void ) {
|
||||
cg.centerPrintCharWidth, (int)(cg.centerPrintCharWidth * 1.5), 0 );
|
||||
|
||||
y += cg.centerPrintCharWidth * 1.5;
|
||||
#endif
|
||||
while ( *start && ( *start != '\n' ) ) {
|
||||
start++;
|
||||
}
|
||||
@@ -2325,7 +2113,6 @@ CG_DrawCenter1FctfString
|
||||
=====================
|
||||
*/
|
||||
static void CG_DrawCenter1FctfString( void ) {
|
||||
#ifndef MISSIONPACK
|
||||
int x, y, w;
|
||||
float *color;
|
||||
char *line;
|
||||
@@ -2366,7 +2153,6 @@ static void CG_DrawCenter1FctfString( void ) {
|
||||
cg.centerPrintCharWidth, (int)(cg.centerPrintCharWidth * 1.5), 0 );
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -2377,7 +2163,6 @@ CG_DrawCenterDDString
|
||||
=====================
|
||||
*/
|
||||
static void CG_DrawCenterDDString( void ) {
|
||||
#ifndef MISSIONPACK
|
||||
int x, y, w;
|
||||
float *color;
|
||||
char *line;
|
||||
@@ -2440,8 +2225,6 @@ static void CG_DrawCenterDDString( void ) {
|
||||
|
||||
CG_DrawStringExt( x, y, line, color, qfalse, qtrue,
|
||||
cg.centerPrintCharWidth, (int)(cg.centerPrintCharWidth * 1.5), 0 );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -2737,14 +2520,8 @@ static void CG_DrawCrosshairNames( void ) {
|
||||
}
|
||||
|
||||
name = cgs.clientinfo[ cg.crosshairClientNum ].name;
|
||||
#ifdef MISSIONPACK
|
||||
color[3] *= 0.5f;
|
||||
w = CG_Text_Width(name, 0.3f, 0);
|
||||
CG_Text_Paint( 320 - w / 2, 190, 0.3f, color, name, 0, 0, ITEM_TEXTSTYLE_SHADOWED);
|
||||
#else
|
||||
w = CG_DrawStrlen( name ) * BIGCHAR_WIDTH;
|
||||
CG_DrawBigString( 320 - w / 2, 170, name, color[3] * 0.5f );
|
||||
#endif
|
||||
trap_R_SetColor( NULL );
|
||||
}
|
||||
|
||||
@@ -2789,15 +2566,8 @@ static void CG_DrawVote(void) {
|
||||
if ( sec < 0 ) {
|
||||
sec = 0;
|
||||
}
|
||||
#ifdef MISSIONPACK
|
||||
s = va("VOTE(%i):%s yes:%i no:%i", sec, cgs.voteString, cgs.voteYes, cgs.voteNo);
|
||||
CG_DrawSmallString( 0, 58, s, 1.0F );
|
||||
s = "or press ESC then click Vote";
|
||||
CG_DrawSmallString( 0, 58 + SMALLCHAR_HEIGHT + 2, s, 1.0F );
|
||||
#else
|
||||
s = va("VOTE(%i):%s yes:%i no:%i", sec, cgs.voteString, cgs.voteYes, cgs.voteNo );
|
||||
CG_DrawSmallString( 0, 58, s, 1.0F );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2837,70 +2607,6 @@ static void CG_DrawTeamVote(void) {
|
||||
|
||||
|
||||
static qboolean CG_DrawScoreboard( void ) {
|
||||
#ifdef MISSIONPACK
|
||||
static qboolean firstTime = qtrue;
|
||||
float fade, *fadeColor;
|
||||
|
||||
if (menuScoreboard) {
|
||||
menuScoreboard->window.flags &= ~WINDOW_FORCED;
|
||||
}
|
||||
if (cg_paused.integer) {
|
||||
cg.deferredPlayerLoading = 0;
|
||||
firstTime = qtrue;
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
// should never happen in Team Arena
|
||||
if (cgs.gametype == GT_SINGLE_PLAYER && cg.predictedPlayerState.pm_type == PM_INTERMISSION ) {
|
||||
cg.deferredPlayerLoading = 0;
|
||||
firstTime = qtrue;
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
// don't draw scoreboard during death while warmup up
|
||||
if ( cg.warmup && !cg.showScores ) {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
if ( cg.showScores || cg.predictedPlayerState.pm_type == PM_DEAD || cg.predictedPlayerState.pm_type == PM_INTERMISSION ) {
|
||||
fade = 1.0;
|
||||
fadeColor = colorWhite;
|
||||
} else {
|
||||
fadeColor = CG_FadeColor( cg.scoreFadeTime, FADE_TIME );
|
||||
if ( !fadeColor ) {
|
||||
// next time scoreboard comes up, don't print killer
|
||||
cg.deferredPlayerLoading = 0;
|
||||
cg.killerName[0] = 0;
|
||||
firstTime = qtrue;
|
||||
return qfalse;
|
||||
}
|
||||
fade = *fadeColor;
|
||||
}
|
||||
|
||||
|
||||
if (menuScoreboard == NULL) {
|
||||
if ( cgs.gametype >= GT_TEAM && cgs.ffa_gt!=1) {
|
||||
menuScoreboard = Menus_FindByName("teamscore_menu");
|
||||
} else {
|
||||
menuScoreboard = Menus_FindByName("score_menu");
|
||||
}
|
||||
}
|
||||
|
||||
if (menuScoreboard) {
|
||||
if (firstTime) {
|
||||
CG_SetScoreSelection(menuScoreboard);
|
||||
firstTime = qfalse;
|
||||
}
|
||||
Menu_Paint(menuScoreboard, qtrue);
|
||||
}
|
||||
|
||||
// load any models that have been deferred
|
||||
if ( ++cg.deferredPlayerLoading > 10 ) {
|
||||
CG_LoadDeferredPlayers();
|
||||
}
|
||||
|
||||
return qtrue;
|
||||
#else
|
||||
char *s;
|
||||
int w;
|
||||
if(cg.respawnTime && cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR && (cgs.gametype < GT_ELIMINATION || cgs.gametype > GT_LMS) ) {
|
||||
@@ -2915,7 +2621,6 @@ static qboolean CG_DrawScoreboard( void ) {
|
||||
}
|
||||
}
|
||||
return CG_DrawOldScoreboard();
|
||||
#endif
|
||||
}
|
||||
|
||||
#define ACCBOARD_XPOS 500
|
||||
@@ -2968,17 +2673,10 @@ CG_DrawIntermission
|
||||
*/
|
||||
static void CG_DrawIntermission( void ) {
|
||||
// int key;
|
||||
#ifdef MISSIONPACK
|
||||
//if (cg_singlePlayer.integer) {
|
||||
// CG_DrawCenterString();
|
||||
// return;
|
||||
//}
|
||||
#else
|
||||
if ( cgs.gametype == GT_SINGLE_PLAYER ) {
|
||||
CG_DrawCenterString();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
cg.scoreFadeTime = cg.time;
|
||||
cg.scoreBoardShowing = CG_DrawScoreboard();
|
||||
}
|
||||
@@ -3046,7 +2744,6 @@ static void CG_DrawAmmoWarning( void ) {
|
||||
}
|
||||
|
||||
|
||||
//#ifdef MISSIONPACK
|
||||
/*
|
||||
=================
|
||||
CG_DrawProxWarning
|
||||
@@ -3130,10 +2827,6 @@ static void CG_DrawWarmup( void ) {
|
||||
|
||||
if ( ci1 && ci2 ) {
|
||||
s = va( "%s vs %s", ci1->name, ci2->name );
|
||||
#ifdef MISSIONPACK
|
||||
w = CG_Text_Width(s, 0.6f, 0);
|
||||
CG_Text_Paint(320 - w / 2, 60, 0.6f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE);
|
||||
#else
|
||||
w = CG_DrawStrlen( s );
|
||||
if ( w > 640 / GIANT_WIDTH ) {
|
||||
cw = 640 / w;
|
||||
@@ -3142,7 +2835,6 @@ static void CG_DrawWarmup( void ) {
|
||||
}
|
||||
CG_DrawStringExt( 320 - w * cw/2, 20,s, colorWhite,
|
||||
qfalse, qtrue, cw, (int)(cw * 1.5f), 0 );
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
if ( cgs.gametype == GT_FFA ) {
|
||||
@@ -3170,10 +2862,6 @@ static void CG_DrawWarmup( void ) {
|
||||
} else {
|
||||
s = "";
|
||||
}
|
||||
#ifdef MISSIONPACK
|
||||
w = CG_Text_Width(s, 0.6f, 0);
|
||||
CG_Text_Paint(320 - w / 2, 90, 0.6f, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE);
|
||||
#else
|
||||
w = CG_DrawStrlen( s );
|
||||
if ( w > 640 / GIANT_WIDTH ) {
|
||||
cw = 640 / w;
|
||||
@@ -3182,7 +2870,6 @@ static void CG_DrawWarmup( void ) {
|
||||
}
|
||||
CG_DrawStringExt( 320 - w * cw/2, 25,s, colorWhite,
|
||||
qfalse, qtrue, cw, (int)(cw * 1.1f), 0 );
|
||||
#endif
|
||||
}
|
||||
|
||||
sec = ( sec - cg.time ) / 1000;
|
||||
@@ -3227,34 +2914,13 @@ static void CG_DrawWarmup( void ) {
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
w = CG_Text_Width(s, scale, 0);
|
||||
CG_Text_Paint(320 - w / 2, 125, scale, colorWhite, s, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE);
|
||||
#else
|
||||
w = CG_DrawStrlen( s );
|
||||
CG_DrawStringExt( 320 - w * cw/2, 70, s, colorWhite,
|
||||
qfalse, qtrue, cw, (int)(cw * 1.5), 0 );
|
||||
#endif
|
||||
}
|
||||
|
||||
//==================================================================================
|
||||
#ifdef MISSIONPACK
|
||||
/*
|
||||
=================
|
||||
CG_DrawTimedMenus
|
||||
=================
|
||||
*/
|
||||
void CG_DrawTimedMenus( void ) {
|
||||
if (cg.voiceTime) {
|
||||
int t = cg.time - cg.voiceTime;
|
||||
if ( t > 2500 ) {
|
||||
Menus_CloseByName("voiceMenu");
|
||||
trap_Cvar_Set("cl_conXOffset", "0");
|
||||
cg.voiceTime = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
=================
|
||||
CG_Draw2D
|
||||
@@ -3262,11 +2928,6 @@ CG_Draw2D
|
||||
*/
|
||||
static void CG_Draw2D(stereoFrame_t stereoFrame)
|
||||
{
|
||||
#ifdef MISSIONPACK
|
||||
if (cgs.orderPending && cg.time > cgs.orderTime) {
|
||||
CG_CheckOrderPending();
|
||||
}
|
||||
#endif
|
||||
// if we are taking a levelshot for the menu, don't draw anything
|
||||
if ( cg.levelShot ) {
|
||||
return;
|
||||
@@ -3297,15 +2958,8 @@ static void CG_Draw2D(stereoFrame_t stereoFrame)
|
||||
// don't draw any status if dead or the scoreboard is being explicitly shown
|
||||
if ( !cg.showScores && cg.snap->ps.stats[STAT_HEALTH] > 0 ) {
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
if ( cg_drawStatus.integer ) {
|
||||
Menu_PaintAll();
|
||||
CG_DrawTimedMenus();
|
||||
}
|
||||
#else
|
||||
CG_DrawStatusBar();
|
||||
#endif
|
||||
|
||||
|
||||
CG_DrawAmmoWarning();
|
||||
|
||||
CG_DrawProxWarning();
|
||||
@@ -3314,18 +2968,14 @@ static void CG_Draw2D(stereoFrame_t stereoFrame)
|
||||
CG_DrawCrosshairNames();
|
||||
CG_DrawWeaponSelect();
|
||||
|
||||
#ifndef MISSIONPACK
|
||||
CG_DrawHoldableItem();
|
||||
CG_DrawPersistantPowerup();
|
||||
#endif
|
||||
|
||||
CG_DrawReward();
|
||||
}
|
||||
|
||||
if ( cgs.gametype >= GT_TEAM && cgs.ffa_gt!=1) {
|
||||
#ifndef MISSIONPACK
|
||||
CG_DrawTeamInfo();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3334,18 +2984,10 @@ static void CG_Draw2D(stereoFrame_t stereoFrame)
|
||||
|
||||
CG_DrawLagometer();
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
if (!cg_paused.integer) {
|
||||
CG_DrawUpperRight(stereoFrame);
|
||||
}
|
||||
#else
|
||||
CG_DrawUpperRight(stereoFrame);
|
||||
#endif
|
||||
|
||||
#ifndef MISSIONPACK
|
||||
CG_DrawLowerRight();
|
||||
CG_DrawLowerLeft();
|
||||
#endif
|
||||
|
||||
if ( !CG_DrawFollow() ) {
|
||||
CG_DrawWarmup();
|
||||
@@ -3364,10 +3006,7 @@ static void CG_Draw2D(stereoFrame_t stereoFrame)
|
||||
|
||||
|
||||
static void CG_DrawTourneyScoreboard( void ) {
|
||||
#ifdef MISSIONPACK
|
||||
#else
|
||||
CG_DrawOldTourneyScoreboard();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -253,18 +253,11 @@ void CG_SpawnEffect( vec3_t org ) {
|
||||
re->reType = RT_MODEL;
|
||||
re->shaderTime = cg.time / 1000.0f;
|
||||
|
||||
#ifndef MISSIONPACK
|
||||
re->customShader = cgs.media.teleportEffectShader;
|
||||
#endif
|
||||
re->hModel = cgs.media.teleportEffectModel;
|
||||
AxisClear( re->axis );
|
||||
|
||||
VectorCopy( org, re->origin );
|
||||
#ifdef MISSIONPACK
|
||||
re->origin[2] += 16;
|
||||
#else
|
||||
re->origin[2] -= 24;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -468,13 +468,11 @@ static void CG_Missile( centity_t *cent ) {
|
||||
ent.hModel = weapon->missileModel;
|
||||
ent.renderfx = weapon->missileRenderfx | RF_NOSHADOW;
|
||||
|
||||
//#ifdef MISSIONPACK
|
||||
if ( cent->currentState.weapon == WP_PROX_LAUNCHER ) {
|
||||
if (s1->generic1 == TEAM_BLUE) {
|
||||
ent.hModel = cgs.media.blueProxMine;
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
// convert direction of travel into axis
|
||||
if ( VectorNormalize2( s1->pos.trDelta, ent.axis[0] ) == 0 ) {
|
||||
@@ -485,12 +483,10 @@ static void CG_Missile( centity_t *cent ) {
|
||||
if ( s1->pos.trType != TR_STATIONARY ) {
|
||||
RotateAroundDirection( ent.axis, cg.time / 4 );
|
||||
} else {
|
||||
//#ifdef MISSIONPACK
|
||||
if ( s1->weapon == WP_PROX_LAUNCHER ) {
|
||||
AnglesToAxis( cent->lerpAngles, ent.axis );
|
||||
}
|
||||
else
|
||||
//#endif
|
||||
{
|
||||
RotateAroundDirection( ent.axis, s1->time );
|
||||
}
|
||||
@@ -832,15 +828,11 @@ CG_TeamBase
|
||||
*/
|
||||
static void CG_TeamBase( centity_t *cent ) {
|
||||
refEntity_t model;
|
||||
//#ifdef MISSIONPACK
|
||||
vec3_t angles;
|
||||
int t, h;
|
||||
float c;
|
||||
|
||||
if ( cgs.gametype == GT_CTF || cgs.gametype == GT_1FCTF ) {
|
||||
//#else
|
||||
// if ( cgs.gametype == GT_CTF) {
|
||||
//#endif
|
||||
// show the flag base
|
||||
memset(&model, 0, sizeof(model));
|
||||
model.reType = RT_MODEL;
|
||||
@@ -858,7 +850,6 @@ static void CG_TeamBase( centity_t *cent ) {
|
||||
}
|
||||
trap_R_AddRefEntityToScene( &model );
|
||||
}
|
||||
//#ifdef MISSIONPACK
|
||||
else if ( cgs.gametype == GT_OBELISK ) {
|
||||
// show the obelisk
|
||||
memset(&model, 0, sizeof(model));
|
||||
|
@@ -24,10 +24,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#include "cg_local.h"
|
||||
|
||||
// for the voice chats
|
||||
#ifdef MISSIONPACK // bk001205
|
||||
#include "../../ui/menudef.h"
|
||||
#endif
|
||||
//==========================================================================
|
||||
|
||||
/*
|
||||
@@ -225,13 +221,7 @@ static void CG_Obituary( entityState_t *ent ) {
|
||||
else
|
||||
s = va("You fragged %s", targetName );
|
||||
}
|
||||
#ifdef MISSIONPACK
|
||||
if (!(cg_singlePlayerActive.integer && cg_cameraOrbit.integer)) {
|
||||
CG_CenterPrint( s, SCREEN_HEIGHT * 0.30, (int)(BIGCHAR_WIDTH * cg_fragmsgsize.value) );
|
||||
}
|
||||
#else
|
||||
CG_CenterPrint( s, SCREEN_HEIGHT * 0.30, (int)(BIGCHAR_WIDTH * cg_fragmsgsize.value) );
|
||||
#endif
|
||||
|
||||
// print the text message as well
|
||||
}
|
||||
@@ -405,7 +395,6 @@ static void CG_UseItem( centity_t *cent ) {
|
||||
trap_S_StartSound (NULL, es->number, CHAN_BODY, cgs.media.medkitSound );
|
||||
break;
|
||||
|
||||
//#ifdef MISSIONPACK
|
||||
case HI_KAMIKAZE:
|
||||
break;
|
||||
|
||||
@@ -414,7 +403,6 @@ static void CG_UseItem( centity_t *cent ) {
|
||||
case HI_INVULNERABILITY:
|
||||
trap_S_StartSound (NULL, es->number, CHAN_BODY, cgs.media.useInvulnerabilitySound );
|
||||
break;
|
||||
//#endif
|
||||
}
|
||||
|
||||
}
|
||||
@@ -734,32 +722,6 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
||||
DEBUGNAME("EV_TAUNT");
|
||||
trap_S_StartSound (NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*taunt.wav" ) );
|
||||
break;
|
||||
#ifdef MISSIONPACK
|
||||
case EV_TAUNT_YES:
|
||||
DEBUGNAME("EV_TAUNT_YES");
|
||||
CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_YES);
|
||||
break;
|
||||
case EV_TAUNT_NO:
|
||||
DEBUGNAME("EV_TAUNT_NO");
|
||||
CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_NO);
|
||||
break;
|
||||
case EV_TAUNT_FOLLOWME:
|
||||
DEBUGNAME("EV_TAUNT_FOLLOWME");
|
||||
CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_FOLLOWME);
|
||||
break;
|
||||
case EV_TAUNT_GETFLAG:
|
||||
DEBUGNAME("EV_TAUNT_GETFLAG");
|
||||
CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONGETFLAG);
|
||||
break;
|
||||
case EV_TAUNT_GUARDBASE:
|
||||
DEBUGNAME("EV_TAUNT_GUARDBASE");
|
||||
CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONDEFENSE);
|
||||
break;
|
||||
case EV_TAUNT_PATROL:
|
||||
DEBUGNAME("EV_TAUNT_PATROL");
|
||||
CG_VoiceChatLocal(SAY_TEAM, qfalse, es->number, COLOR_CYAN, VOICECHAT_ONPATROL);
|
||||
break;
|
||||
#endif
|
||||
case EV_WATER_TOUCH:
|
||||
DEBUGNAME("EV_WATER_TOUCH");
|
||||
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.watrInSound );
|
||||
@@ -795,22 +757,6 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
||||
if ( item->giType == IT_POWERUP || item->giType == IT_TEAM) {
|
||||
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.n_healthSound );
|
||||
} else if (item->giType == IT_PERSISTANT_POWERUP) {
|
||||
#ifdef MISSIONPACK
|
||||
switch (item->giTag ) {
|
||||
case PW_SCOUT:
|
||||
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.scoutSound );
|
||||
break;
|
||||
case PW_GUARD:
|
||||
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.guardSound );
|
||||
break;
|
||||
case PW_DOUBLER:
|
||||
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.doublerSound );
|
||||
break;
|
||||
case PW_AMMOREGEN:
|
||||
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.ammoregenSound );
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound, qfalse ) );
|
||||
}
|
||||
@@ -1172,19 +1118,15 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
||||
}
|
||||
else {
|
||||
if (cgs.clientinfo[cg.clientNum].team == TEAM_BLUE) {
|
||||
//#ifdef MISSIONPACK
|
||||
if (cgs.gametype == GT_1FCTF)
|
||||
CG_AddBufferedSound( cgs.media.yourTeamTookTheFlagSound );
|
||||
else
|
||||
//#endif
|
||||
CG_AddBufferedSound( cgs.media.enemyTookYourFlagSound );
|
||||
}
|
||||
else if (cgs.clientinfo[cg.clientNum].team == TEAM_RED) {
|
||||
//#ifdef MISSIONPACK
|
||||
if (cgs.gametype == GT_1FCTF)
|
||||
CG_AddBufferedSound( cgs.media.enemyTookTheFlagSound );
|
||||
else
|
||||
//#endif
|
||||
CG_AddBufferedSound( cgs.media.yourTeamTookEnemyFlagSound );
|
||||
}
|
||||
}
|
||||
@@ -1195,19 +1137,15 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
||||
}
|
||||
else {
|
||||
if (cgs.clientinfo[cg.clientNum].team == TEAM_RED) {
|
||||
//#ifdef MISSIONPACK
|
||||
if (cgs.gametype == GT_1FCTF)
|
||||
CG_AddBufferedSound( cgs.media.yourTeamTookTheFlagSound );
|
||||
else
|
||||
//#endif
|
||||
CG_AddBufferedSound( cgs.media.enemyTookYourFlagSound );
|
||||
}
|
||||
else if (cgs.clientinfo[cg.clientNum].team == TEAM_BLUE) {
|
||||
//#ifdef MISSIONPACK
|
||||
if (cgs.gametype == GT_1FCTF)
|
||||
CG_AddBufferedSound( cgs.media.enemyTookTheFlagSound );
|
||||
else
|
||||
//#endif
|
||||
CG_AddBufferedSound( cgs.media.yourTeamTookEnemyFlagSound );
|
||||
}
|
||||
}
|
||||
|
@@ -250,7 +250,6 @@ void CG_DrawInformation( void ) {
|
||||
case GT_CTF:
|
||||
s = "Capture The Flag";
|
||||
break;
|
||||
//#ifdef MISSIONPACK
|
||||
case GT_1FCTF:
|
||||
s = "One Flag CTF";
|
||||
break;
|
||||
@@ -260,7 +259,6 @@ void CG_DrawInformation( void ) {
|
||||
case GT_HARVESTER:
|
||||
s = "Harvester";
|
||||
break;
|
||||
//#endif
|
||||
case GT_ELIMINATION:
|
||||
s = "Elimination";
|
||||
break;
|
||||
|
@@ -33,10 +33,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
// If you absolutely need something stored, it can either be kept
|
||||
// by the server in the server stored userinfos, or stashed in a cvar.
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
#define CG_FONT_THRESHOLD 0.1
|
||||
#endif
|
||||
|
||||
#define POWERUP_BLINKS 5
|
||||
|
||||
#define POWERUP_BLINK_TIME 1000
|
||||
@@ -86,16 +82,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#define TEAM_OVERLAY_MAXLOCATION_WIDTH 16
|
||||
|
||||
#define DEFAULT_MODEL "sarge"
|
||||
#ifdef MISSIONPACK
|
||||
#define DEFAULT_TEAM_MODEL "sergei"
|
||||
#define DEFAULT_TEAM_HEAD "*sergei"
|
||||
#else
|
||||
#define DEFAULT_TEAM_MODEL "sarge"
|
||||
#define DEFAULT_TEAM_HEAD "sarge"
|
||||
#endif
|
||||
|
||||
#define DEFAULT_REDTEAM_NAME "Vim supporters"
|
||||
#define DEFAULT_BLUETEAM_NAME "Emacs supporters"
|
||||
#define DEFAULT_REDTEAM_NAME "Youkai"
|
||||
#define DEFAULT_BLUETEAM_NAME "Human"
|
||||
|
||||
typedef enum {
|
||||
FOOTSTEP_NORMAL,
|
||||
@@ -800,10 +791,8 @@ typedef struct {
|
||||
qhandle_t lmarkbullet3;
|
||||
qhandle_t lmarkbullet4;
|
||||
|
||||
//#ifdef MISSIONPACK
|
||||
qhandle_t nailPuffShader;
|
||||
qhandle_t blueProxMine;
|
||||
//#endif
|
||||
|
||||
qhandle_t numberShaders[11];
|
||||
|
||||
@@ -854,7 +843,6 @@ typedef struct {
|
||||
// special effects models
|
||||
qhandle_t teleportEffectModel;
|
||||
qhandle_t teleportEffectShader;
|
||||
//#ifdef MISSIONPACK
|
||||
qhandle_t kamikazeEffectModel;
|
||||
qhandle_t kamikazeShockWave;
|
||||
qhandle_t kamikazeHeadModel;
|
||||
@@ -868,7 +856,6 @@ typedef struct {
|
||||
qhandle_t medkitUsageModel;
|
||||
qhandle_t dustPuffShader;
|
||||
qhandle_t heartShader;
|
||||
//#endif
|
||||
qhandle_t invulnerabilityPowerupModel;
|
||||
|
||||
// scoreboard headers
|
||||
@@ -901,7 +888,6 @@ typedef struct {
|
||||
sfxHandle_t sfx_railg;
|
||||
sfxHandle_t sfx_rockexp;
|
||||
sfxHandle_t sfx_plasmaexp;
|
||||
//#ifdef MISSIONPACK
|
||||
sfxHandle_t sfx_proxexp;
|
||||
sfxHandle_t sfx_nghit;
|
||||
sfxHandle_t sfx_nghitflesh;
|
||||
@@ -1025,21 +1011,6 @@ typedef struct {
|
||||
sfxHandle_t countFightSound;
|
||||
sfxHandle_t countPrepareSound;
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
// new stuff
|
||||
qhandle_t patrolShader;
|
||||
qhandle_t assaultShader;
|
||||
qhandle_t campShader;
|
||||
qhandle_t followShader;
|
||||
qhandle_t defendShader;
|
||||
qhandle_t teamLeaderShader;
|
||||
qhandle_t retrieveShader;
|
||||
qhandle_t escortShader;
|
||||
qhandle_t deathShader;
|
||||
qhandle_t flagShaders[3];
|
||||
sfxHandle_t countPrepareTeamSound;
|
||||
#endif
|
||||
|
||||
sfxHandle_t ammoregenSound;
|
||||
sfxHandle_t doublerSound;
|
||||
sfxHandle_t guardSound;
|
||||
@@ -1294,16 +1265,6 @@ extern vmCvar_t cg_leiSuperGoreyAwesome; // LEILEI'S LINE!
|
||||
extern vmCvar_t cg_oldPlasma;
|
||||
extern vmCvar_t cg_trueLightning;
|
||||
extern vmCvar_t cg_music;
|
||||
#ifdef MISSIONPACK
|
||||
extern vmCvar_t cg_redTeamName;
|
||||
extern vmCvar_t cg_blueTeamName;
|
||||
extern vmCvar_t cg_currentSelectedPlayer;
|
||||
extern vmCvar_t cg_currentSelectedPlayerName;
|
||||
extern vmCvar_t cg_singlePlayer;
|
||||
extern vmCvar_t cg_singlePlayerActive;
|
||||
extern vmCvar_t cg_recordSPDemo;
|
||||
extern vmCvar_t cg_recordSPDemoName;
|
||||
#endif
|
||||
//Sago: Moved outside
|
||||
extern vmCvar_t cg_obeliskRespawnDelay;
|
||||
extern vmCvar_t cg_enableDust;
|
||||
@@ -1613,14 +1574,12 @@ localEntity_t *CG_SmokePuff( const vec3_t p,
|
||||
qhandle_t hShader );
|
||||
void CG_BubbleTrail( vec3_t start, vec3_t end, float spacing );
|
||||
void CG_SpawnEffect( vec3_t org );
|
||||
//#ifdef MISSIONPACK
|
||||
void CG_KamikazeEffect( vec3_t org );
|
||||
void CG_ObeliskExplode( vec3_t org, int entityNum );
|
||||
void CG_ObeliskPain( vec3_t org );
|
||||
void CG_InvulnerabilityImpact( vec3_t org, vec3_t angles );
|
||||
void CG_InvulnerabilityJuiced( vec3_t org );
|
||||
void CG_LightningBoltBeam( vec3_t start, vec3_t end );
|
||||
//#endif
|
||||
void CG_ScorePlum( int client, vec3_t org, int score );
|
||||
|
||||
void CG_GibPlayer( vec3_t playerOrigin );
|
||||
|
@@ -747,7 +747,6 @@ static void CG_AddSpriteExplosion( localEntity_t *le ) {
|
||||
}
|
||||
|
||||
|
||||
//#ifdef MISSIONPACK
|
||||
/*
|
||||
====================
|
||||
CG_AddKamikaze
|
||||
@@ -921,7 +920,6 @@ void CG_AddRefEntity( localEntity_t *le ) {
|
||||
trap_R_AddRefEntityToScene( &le->refEntity );
|
||||
}
|
||||
|
||||
//#endif
|
||||
/*
|
||||
===================
|
||||
CG_AddScorePlum
|
||||
@@ -1073,8 +1071,7 @@ void CG_AddLocalEntities( void ) {
|
||||
case LE_SCOREPLUM:
|
||||
CG_AddScorePlum( le );
|
||||
break;
|
||||
|
||||
//#ifdef MISSIONPACK
|
||||
|
||||
case LE_KAMIKAZE:
|
||||
CG_AddKamikaze( le );
|
||||
break;
|
||||
@@ -1087,7 +1084,6 @@ void CG_AddLocalEntities( void ) {
|
||||
case LE_SHOWREFENTITY:
|
||||
CG_AddRefEntity( le );
|
||||
break;
|
||||
//#endif
|
||||
|
||||
case LE_GORE: // blood
|
||||
CG_AddGore( le );
|
||||
|
@@ -23,12 +23,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
// cg_main.c -- initialization and primary entry point for cgame
|
||||
#include "cg_local.h"
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
#include "../ui/ui_shared.h"
|
||||
// display context for new ui stuff
|
||||
displayContextDef_t cgDC;
|
||||
#endif
|
||||
|
||||
int forceModelModificationCount = -1;
|
||||
|
||||
void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum );
|
||||
@@ -66,10 +60,6 @@ intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4,
|
||||
CG_KeyEvent(arg0, arg1);
|
||||
return 0;
|
||||
case CG_MOUSE_EVENT:
|
||||
#ifdef MISSIONPACK
|
||||
cgDC.cursorx = cgs.cursorX;
|
||||
cgDC.cursory = cgs.cursorY;
|
||||
#endif
|
||||
CG_MouseEvent(arg0, arg1);
|
||||
return 0;
|
||||
case CG_EVENT_HANDLING:
|
||||
@@ -195,16 +185,6 @@ vmCvar_t cg_music;
|
||||
vmCvar_t cg_weaponOrder;
|
||||
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
vmCvar_t cg_redTeamName;
|
||||
vmCvar_t cg_blueTeamName;
|
||||
vmCvar_t cg_currentSelectedPlayer;
|
||||
vmCvar_t cg_currentSelectedPlayerName;
|
||||
vmCvar_t cg_singlePlayer;
|
||||
vmCvar_t cg_singlePlayerActive;
|
||||
vmCvar_t cg_recordSPDemo;
|
||||
vmCvar_t cg_recordSPDemoName;
|
||||
#endif
|
||||
vmCvar_t cg_obeliskRespawnDelay;
|
||||
vmCvar_t cg_enableDust;
|
||||
vmCvar_t cg_enableBreath;
|
||||
@@ -339,11 +319,7 @@ static cvarTable_t cvarTable[] = { // bk001129
|
||||
{ &cg_teamChatHeight, "cg_teamChatHeight", "0", CVAR_ARCHIVE },
|
||||
{ &cg_forceModel, "cg_forceModel", "0", CVAR_ARCHIVE },
|
||||
{ &cg_predictItems, "cg_predictItems", "1", CVAR_ARCHIVE },
|
||||
#ifdef MISSIONPACK
|
||||
{ &cg_deferPlayers, "cg_deferPlayers", "0", CVAR_ARCHIVE },
|
||||
#else
|
||||
{ &cg_deferPlayers, "cg_deferPlayers", "1", CVAR_ARCHIVE },
|
||||
#endif
|
||||
{ &cg_drawTeamOverlay, "cg_drawTeamOverlay", "0", CVAR_ARCHIVE },
|
||||
{ &cg_teamOverlayUserinfo, "teamoverlay", "0", CVAR_ROM | CVAR_USERINFO },
|
||||
{ &cg_stats, "cg_stats", "0", 0 },
|
||||
@@ -365,17 +341,6 @@ static cvarTable_t cvarTable[] = { // bk001129
|
||||
{ &cg_synchronousClients, "g_synchronousClients", "0", CVAR_SYSTEMINFO }, // communicated by systeminfo
|
||||
|
||||
{ &cg_autovertex, "cg_autovertex", "0", CVAR_ARCHIVE },
|
||||
#ifdef MISSIONPACK
|
||||
{ &cg_redTeamName, "g_redteam", DEFAULT_REDTEAM_NAME, CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO },
|
||||
{ &cg_blueTeamName, "g_blueteam", DEFAULT_BLUETEAM_NAME, CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO },
|
||||
{ &cg_currentSelectedPlayer, "cg_currentSelectedPlayer", "0", CVAR_ARCHIVE},
|
||||
{ &cg_currentSelectedPlayerName, "cg_currentSelectedPlayerName", "", CVAR_ARCHIVE},
|
||||
{ &cg_singlePlayer, "ui_singlePlayerActive", "0", CVAR_USERINFO},
|
||||
{ &cg_singlePlayerActive, "ui_singlePlayerActive", "0", CVAR_USERINFO},
|
||||
{ &cg_recordSPDemo, "ui_recordSPDemo", "0", CVAR_ARCHIVE},
|
||||
{ &cg_recordSPDemoName, "ui_recordSPDemoName", "", CVAR_ARCHIVE},
|
||||
{ &cg_hudFiles, "cg_hudFiles", "ui/hud.txt", CVAR_ARCHIVE},
|
||||
#endif
|
||||
{ &cg_enableDust, "g_enableDust", "0", CVAR_SERVERINFO},
|
||||
{ &cg_enableBreath, "g_enableBreath", "0", CVAR_SERVERINFO},
|
||||
{ &cg_obeliskRespawnDelay, "g_obeliskRespawnDelay", "10", CVAR_SERVERINFO},
|
||||
@@ -713,11 +678,6 @@ static void CG_RegisterSounds( void ) {
|
||||
char name[MAX_QPATH];
|
||||
const char *soundName;
|
||||
|
||||
// voice commands
|
||||
#ifdef MISSIONPACK
|
||||
CG_LoadVoiceChats();
|
||||
#endif
|
||||
|
||||
cgs.media.oneMinuteSound = trap_S_RegisterSound( "sound/feedback/1_minute.wav", qtrue );
|
||||
cgs.media.fiveMinuteSound = trap_S_RegisterSound( "sound/feedback/5_minute.wav", qtrue );
|
||||
cgs.media.suddenDeathSound = trap_S_RegisterSound( "sound/feedback/sudden_death.wav", qtrue );
|
||||
@@ -729,9 +689,6 @@ static void CG_RegisterSounds( void ) {
|
||||
cgs.media.count1Sound = trap_S_RegisterSound( "sound/feedback/one.wav", qtrue );
|
||||
cgs.media.countFightSound = trap_S_RegisterSound( "sound/feedback/fight.wav", qtrue );
|
||||
cgs.media.countPrepareSound = trap_S_RegisterSound( "sound/feedback/prepare.wav", qtrue );
|
||||
#ifdef MISSIONPACK
|
||||
cgs.media.countPrepareTeamSound = trap_S_RegisterSound( "sound/feedback/prepare_team.wav", qtrue );
|
||||
#endif
|
||||
|
||||
// N_G: Another condition that makes no sense to me, see for
|
||||
// yourself if you really meant this
|
||||
@@ -836,33 +793,15 @@ static void CG_RegisterSounds( void ) {
|
||||
cgs.media.hitSound = trap_S_RegisterSound( "sound/feedback/hit.wav", qfalse );
|
||||
};
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
cgs.media.hitSoundHighArmor = trap_S_RegisterSound( "sound/feedback/hithi.wav", qfalse );
|
||||
cgs.media.hitSoundLowArmor = trap_S_RegisterSound( "sound/feedback/hitlo.wav", qfalse );
|
||||
#endif
|
||||
|
||||
cgs.media.impressiveSound = trap_S_RegisterSound( "sound/feedback/impressive.wav", qtrue );
|
||||
cgs.media.excellentSound = trap_S_RegisterSound( "sound/feedback/excellent.wav", qtrue );
|
||||
cgs.media.deniedSound = trap_S_RegisterSound( "sound/feedback/denied.wav", qtrue );
|
||||
cgs.media.humiliationSound = trap_S_RegisterSound( "sound/feedback/humiliation.wav", qtrue );
|
||||
cgs.media.assistSound = trap_S_RegisterSound( "sound/feedback/assist.wav", qtrue );
|
||||
cgs.media.defendSound = trap_S_RegisterSound( "sound/feedback/defense.wav", qtrue );
|
||||
#ifdef MISSIONPACK
|
||||
cgs.media.firstImpressiveSound = trap_S_RegisterSound( "sound/feedback/first_impressive.wav", qtrue );
|
||||
cgs.media.firstExcellentSound = trap_S_RegisterSound( "sound/feedback/first_excellent.wav", qtrue );
|
||||
cgs.media.firstHumiliationSound = trap_S_RegisterSound( "sound/feedback/first_gauntlet.wav", qtrue );
|
||||
#endif
|
||||
|
||||
cgs.media.takenLeadSound = trap_S_RegisterSound( "sound/feedback/takenlead.wav", qtrue);
|
||||
cgs.media.tiedLeadSound = trap_S_RegisterSound( "sound/feedback/tiedlead.wav", qtrue);
|
||||
cgs.media.lostLeadSound = trap_S_RegisterSound( "sound/feedback/lostlead.wav", qtrue);
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
cgs.media.voteNow = trap_S_RegisterSound( "sound/feedback/vote_now.wav", qtrue);
|
||||
cgs.media.votePassed = trap_S_RegisterSound( "sound/feedback/vote_passed.wav", qtrue);
|
||||
cgs.media.voteFailed = trap_S_RegisterSound( "sound/feedback/vote_failed.wav", qtrue);
|
||||
#endif
|
||||
|
||||
cgs.media.watrInSound = trap_S_RegisterSound( "sound/player/watr_in.wav", qfalse);
|
||||
cgs.media.watrOutSound = trap_S_RegisterSound( "sound/player/watr_out.wav", qfalse);
|
||||
cgs.media.watrUnSound = trap_S_RegisterSound( "sound/player/watr_un.wav", qfalse);
|
||||
@@ -947,35 +886,6 @@ static void CG_RegisterSounds( void ) {
|
||||
cgs.media.n_healthSound = trap_S_RegisterSound("sound/items/n_health.wav", qfalse );
|
||||
cgs.media.hgrenb1aSound = trap_S_RegisterSound("sound/weapons/grenade/hgrenb1a.wav", qfalse);
|
||||
cgs.media.hgrenb2aSound = trap_S_RegisterSound("sound/weapons/grenade/hgrenb2a.wav", qfalse);
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
trap_S_RegisterSound("sound/player/sergei/death1.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/sergei/death2.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/sergei/death3.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/sergei/jump1.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/sergei/pain25_1.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/sergei/pain75_1.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/sergei/pain100_1.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/sergei/falling1.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/sergei/gasp.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/sergei/drown.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/sergei/fall1.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/sergei/taunt.wav", qfalse );
|
||||
|
||||
trap_S_RegisterSound("sound/player/kyonshi/death1.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/kyonshi/death2.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/kyonshi/death3.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/kyonshi/jump1.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/kyonshi/pain25_1.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/kyonshi/pain75_1.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/kyonshi/pain100_1.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/kyonshi/falling1.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/kyonshi/gasp.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/kyonshi/drown.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/kyonshi/fall1.wav", qfalse );
|
||||
trap_S_RegisterSound("sound/player/kyonshi/taunt.wav", qfalse );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1181,12 +1091,8 @@ static void CG_RegisterGraphics( void ) {
|
||||
cgs.media.bulletFlashModel = trap_R_RegisterModel("models/weaphits/bullet.md3");
|
||||
cgs.media.ringFlashModel = trap_R_RegisterModel("models/weaphits/ring02.md3");
|
||||
cgs.media.dishFlashModel = trap_R_RegisterModel("models/weaphits/boom01.md3");
|
||||
#ifdef MISSIONPACK
|
||||
cgs.media.teleportEffectModel = trap_R_RegisterModel( "models/powerups/pop.md3" );
|
||||
#else
|
||||
cgs.media.teleportEffectModel = trap_R_RegisterModel( "models/misc/telep.md3" );
|
||||
cgs.media.teleportEffectShader = trap_R_RegisterShader( "teleportEffect" );
|
||||
#endif
|
||||
cgs.media.kamikazeEffectModel = trap_R_RegisterModel( "models/weaphits/kamboom2.md3" );
|
||||
cgs.media.kamikazeShockWave = trap_R_RegisterModel( "models/weaphits/kamwave.md3" );
|
||||
cgs.media.kamikazeHeadModel = trap_R_RegisterModel( "models/powerups/kamikazi.md3" );
|
||||
@@ -1282,35 +1188,6 @@ static void CG_RegisterGraphics( void ) {
|
||||
}
|
||||
cgs.gameModels[i] = trap_R_RegisterModel( modelName );
|
||||
}
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
// new stuff
|
||||
cgs.media.patrolShader = trap_R_RegisterShaderNoMip("ui/assets/statusbar/patrol.tga");
|
||||
cgs.media.assaultShader = trap_R_RegisterShaderNoMip("ui/assets/statusbar/assault.tga");
|
||||
cgs.media.campShader = trap_R_RegisterShaderNoMip("ui/assets/statusbar/camp.tga");
|
||||
cgs.media.followShader = trap_R_RegisterShaderNoMip("ui/assets/statusbar/follow.tga");
|
||||
cgs.media.defendShader = trap_R_RegisterShaderNoMip("ui/assets/statusbar/defend.tga");
|
||||
cgs.media.teamLeaderShader = trap_R_RegisterShaderNoMip("ui/assets/statusbar/team_leader.tga");
|
||||
cgs.media.retrieveShader = trap_R_RegisterShaderNoMip("ui/assets/statusbar/retrieve.tga");
|
||||
cgs.media.escortShader = trap_R_RegisterShaderNoMip("ui/assets/statusbar/escort.tga");
|
||||
cgs.media.deathShader = trap_R_RegisterShaderNoMip("ui/assets/statusbar/death.tga");
|
||||
|
||||
cgs.media.cursor = trap_R_RegisterShaderNoMip( "menu/art/3_cursor2" );
|
||||
cgs.media.sizeCursor = trap_R_RegisterShaderNoMip( "ui/assets/sizecursor.tga" );
|
||||
cgs.media.selectCursor = trap_R_RegisterShaderNoMip( "ui/assets/selectcursor.tga" );
|
||||
cgs.media.flagShaders[0] = trap_R_RegisterShaderNoMip("ui/assets/statusbar/flag_in_base.tga");
|
||||
cgs.media.flagShaders[1] = trap_R_RegisterShaderNoMip("ui/assets/statusbar/flag_capture.tga");
|
||||
cgs.media.flagShaders[2] = trap_R_RegisterShaderNoMip("ui/assets/statusbar/flag_missing.tga");
|
||||
|
||||
trap_R_RegisterModel( "models/players/sergei/lower.md3" );
|
||||
trap_R_RegisterModel( "models/players/sergei/upper.md3" );
|
||||
trap_R_RegisterModel( "models/players/sergei/head.md3" );
|
||||
|
||||
trap_R_RegisterModel( "models/players/kyonshi/lower.md3" );
|
||||
trap_R_RegisterModel( "models/players/kyonshi/upper.md3" );
|
||||
trap_R_RegisterModel( "models/players/kyonshi/head.md3" );
|
||||
|
||||
#endif
|
||||
CG_ClearParticles ();
|
||||
/*
|
||||
for (i=1; i<MAX_PARTICLES_AREAS; i++)
|
||||
@@ -1415,665 +1292,7 @@ void CG_StartMusic( void ) {
|
||||
trap_S_StartBackgroundTrack( parm1, parm2 );
|
||||
}
|
||||
}
|
||||
#ifdef MISSIONPACK
|
||||
char *CG_GetMenuBuffer(const char *filename) {
|
||||
int len;
|
||||
fileHandle_t f;
|
||||
static char buf[MAX_MENUFILE];
|
||||
|
||||
len = trap_FS_FOpenFile( filename, &f, FS_READ );
|
||||
if ( !f ) {
|
||||
trap_Print( va( S_COLOR_RED "menu file not found: %s, using default\n", filename ) );
|
||||
return NULL;
|
||||
}
|
||||
if ( len >= MAX_MENUFILE ) {
|
||||
trap_Print( va( S_COLOR_RED "menu file too large: %s is %i, max allowed is %i\n", filename, len, MAX_MENUFILE ) );
|
||||
trap_FS_FCloseFile( f );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
trap_FS_Read( buf, len, f );
|
||||
buf[len] = 0;
|
||||
trap_FS_FCloseFile( f );
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
//
|
||||
// ==============================
|
||||
// new hud stuff ( mission pack )
|
||||
// ==============================
|
||||
//
|
||||
qboolean CG_Asset_Parse(int handle) {
|
||||
pc_token_t token;
|
||||
const char *tempStr;
|
||||
|
||||
if (!trap_PC_ReadToken(handle, &token))
|
||||
return qfalse;
|
||||
if (Q_stricmp(token.string, "{") != 0) {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
while ( 1 ) {
|
||||
if (!trap_PC_ReadToken(handle, &token))
|
||||
return qfalse;
|
||||
|
||||
if (Q_stricmp(token.string, "}") == 0) {
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
// font
|
||||
if (Q_stricmp(token.string, "font") == 0) {
|
||||
int pointSize;
|
||||
if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle, &pointSize)) {
|
||||
return qfalse;
|
||||
}
|
||||
cgDC.registerFont(tempStr, pointSize, &cgDC.Assets.textFont);
|
||||
continue;
|
||||
}
|
||||
|
||||
// smallFont
|
||||
if (Q_stricmp(token.string, "smallFont") == 0) {
|
||||
int pointSize;
|
||||
if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle, &pointSize)) {
|
||||
return qfalse;
|
||||
}
|
||||
cgDC.registerFont(tempStr, pointSize, &cgDC.Assets.smallFont);
|
||||
continue;
|
||||
}
|
||||
|
||||
// font
|
||||
if (Q_stricmp(token.string, "bigfont") == 0) {
|
||||
int pointSize;
|
||||
if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle, &pointSize)) {
|
||||
return qfalse;
|
||||
}
|
||||
cgDC.registerFont(tempStr, pointSize, &cgDC.Assets.bigFont);
|
||||
continue;
|
||||
}
|
||||
|
||||
// gradientbar
|
||||
if (Q_stricmp(token.string, "gradientbar") == 0) {
|
||||
if (!PC_String_Parse(handle, &tempStr)) {
|
||||
return qfalse;
|
||||
}
|
||||
cgDC.Assets.gradientBar = trap_R_RegisterShaderNoMip(tempStr);
|
||||
continue;
|
||||
}
|
||||
|
||||
// enterMenuSound
|
||||
if (Q_stricmp(token.string, "menuEnterSound") == 0) {
|
||||
if (!PC_String_Parse(handle, &tempStr)) {
|
||||
return qfalse;
|
||||
}
|
||||
cgDC.Assets.menuEnterSound = trap_S_RegisterSound( tempStr, qfalse );
|
||||
continue;
|
||||
}
|
||||
|
||||
// exitMenuSound
|
||||
if (Q_stricmp(token.string, "menuExitSound") == 0) {
|
||||
if (!PC_String_Parse(handle, &tempStr)) {
|
||||
return qfalse;
|
||||
}
|
||||
cgDC.Assets.menuExitSound = trap_S_RegisterSound( tempStr, qfalse );
|
||||
continue;
|
||||
}
|
||||
|
||||
// itemFocusSound
|
||||
if (Q_stricmp(token.string, "itemFocusSound") == 0) {
|
||||
if (!PC_String_Parse(handle, &tempStr)) {
|
||||
return qfalse;
|
||||
}
|
||||
cgDC.Assets.itemFocusSound = trap_S_RegisterSound( tempStr, qfalse );
|
||||
continue;
|
||||
}
|
||||
|
||||
// menuBuzzSound
|
||||
if (Q_stricmp(token.string, "menuBuzzSound") == 0) {
|
||||
if (!PC_String_Parse(handle, &tempStr)) {
|
||||
return qfalse;
|
||||
}
|
||||
cgDC.Assets.menuBuzzSound = trap_S_RegisterSound( tempStr, qfalse );
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Q_stricmp(token.string, "cursor") == 0) {
|
||||
if (!PC_String_Parse(handle, &cgDC.Assets.cursorStr)) {
|
||||
return qfalse;
|
||||
}
|
||||
cgDC.Assets.cursor = trap_R_RegisterShaderNoMip( cgDC.Assets.cursorStr);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Q_stricmp(token.string, "fadeClamp") == 0) {
|
||||
if (!PC_Float_Parse(handle, &cgDC.Assets.fadeClamp)) {
|
||||
return qfalse;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Q_stricmp(token.string, "fadeCycle") == 0) {
|
||||
if (!PC_Int_Parse(handle, &cgDC.Assets.fadeCycle)) {
|
||||
return qfalse;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Q_stricmp(token.string, "fadeAmount") == 0) {
|
||||
if (!PC_Float_Parse(handle, &cgDC.Assets.fadeAmount)) {
|
||||
return qfalse;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Q_stricmp(token.string, "shadowX") == 0) {
|
||||
if (!PC_Float_Parse(handle, &cgDC.Assets.shadowX)) {
|
||||
return qfalse;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Q_stricmp(token.string, "shadowY") == 0) {
|
||||
if (!PC_Float_Parse(handle, &cgDC.Assets.shadowY)) {
|
||||
return qfalse;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Q_stricmp(token.string, "shadowColor") == 0) {
|
||||
if (!PC_Color_Parse(handle, &cgDC.Assets.shadowColor)) {
|
||||
return qfalse;
|
||||
}
|
||||
cgDC.Assets.shadowFadeClamp = cgDC.Assets.shadowColor[3];
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return qfalse; // bk001204 - why not?
|
||||
}
|
||||
|
||||
void CG_ParseMenu(const char *menuFile) {
|
||||
pc_token_t token;
|
||||
int handle;
|
||||
|
||||
handle = trap_PC_LoadSource(menuFile);
|
||||
if (!handle)
|
||||
handle = trap_PC_LoadSource("ui/testhud.menu");
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
while ( 1 ) {
|
||||
if (!trap_PC_ReadToken( handle, &token )) {
|
||||
break;
|
||||
}
|
||||
|
||||
//if ( Q_stricmp( token, "{" ) ) {
|
||||
// Com_Printf( "Missing { in menu file\n" );
|
||||
// break;
|
||||
//}
|
||||
|
||||
//if ( menuCount == MAX_MENUS ) {
|
||||
// Com_Printf( "Too many menus!\n" );
|
||||
// break;
|
||||
//}
|
||||
|
||||
if ( token.string[0] == '}' ) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (Q_stricmp(token.string, "assetGlobalDef") == 0) {
|
||||
if (CG_Asset_Parse(handle)) {
|
||||
continue;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (Q_stricmp(token.string, "menudef") == 0) {
|
||||
// start a new menu
|
||||
Menu_New(handle);
|
||||
}
|
||||
}
|
||||
trap_PC_FreeSource(handle);
|
||||
}
|
||||
|
||||
qboolean CG_Load_Menu(char **p) {
|
||||
char *token;
|
||||
|
||||
token = COM_ParseExt(p, qtrue);
|
||||
|
||||
if (token[0] != '{') {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
while ( 1 ) {
|
||||
|
||||
token = COM_ParseExt(p, qtrue);
|
||||
|
||||
if (Q_stricmp(token, "}") == 0) {
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
if ( !token || token[0] == 0 ) {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
CG_ParseMenu(token);
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CG_LoadMenus(const char *menuFile) {
|
||||
char *token;
|
||||
char *p;
|
||||
int len, start;
|
||||
fileHandle_t f;
|
||||
static char buf[MAX_MENUDEFFILE];
|
||||
|
||||
start = trap_Milliseconds();
|
||||
|
||||
len = trap_FS_FOpenFile( menuFile, &f, FS_READ );
|
||||
if ( !f ) {
|
||||
trap_Error( va( S_COLOR_YELLOW "menu file not found: %s, using default\n", menuFile ) );
|
||||
len = trap_FS_FOpenFile( "ui/hud.txt", &f, FS_READ );
|
||||
if (!f) {
|
||||
trap_Error( va( S_COLOR_RED "default menu file not found: ui/hud.txt, unable to continue!\n") );
|
||||
}
|
||||
}
|
||||
|
||||
if ( len >= MAX_MENUDEFFILE ) {
|
||||
trap_Error( va( S_COLOR_RED "menu file too large: %s is %i, max allowed is %i\n", menuFile, len, MAX_MENUDEFFILE ) );
|
||||
trap_FS_FCloseFile( f );
|
||||
return;
|
||||
}
|
||||
|
||||
trap_FS_Read( buf, len, f );
|
||||
buf[len] = 0;
|
||||
trap_FS_FCloseFile( f );
|
||||
|
||||
COM_Compress(buf);
|
||||
|
||||
Menu_Reset();
|
||||
|
||||
p = buf;
|
||||
|
||||
while ( 1 ) {
|
||||
token = COM_ParseExt( &p, qtrue );
|
||||
if( !token || token[0] == 0 || token[0] == '}') {
|
||||
break;
|
||||
}
|
||||
|
||||
//if ( Q_stricmp( token, "{" ) ) {
|
||||
// Com_Printf( "Missing { in menu file\n" );
|
||||
// break;
|
||||
//}
|
||||
|
||||
//if ( menuCount == MAX_MENUS ) {
|
||||
// Com_Printf( "Too many menus!\n" );
|
||||
// break;
|
||||
//}
|
||||
|
||||
if ( Q_stricmp( token, "}" ) == 0 ) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (Q_stricmp(token, "loadmenu") == 0) {
|
||||
if (CG_Load_Menu(&p)) {
|
||||
continue;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Com_Printf("UI menu load time = %d milli seconds\n", trap_Milliseconds() - start);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
static qboolean CG_OwnerDrawHandleKey(int ownerDraw, int flags, float *special, int key) {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
|
||||
static int CG_FeederCount(float feederID) {
|
||||
int i, count;
|
||||
count = 0;
|
||||
if (feederID == FEEDER_REDTEAM_LIST) {
|
||||
for (i = 0; i < cg.numScores; i++) {
|
||||
if (cg.scores[i].team == TEAM_RED) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
} else if (feederID == FEEDER_BLUETEAM_LIST) {
|
||||
for (i = 0; i < cg.numScores; i++) {
|
||||
if (cg.scores[i].team == TEAM_BLUE) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
} else if (feederID == FEEDER_SCOREBOARD) {
|
||||
return cg.numScores;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
void CG_SetScoreSelection(void *p) {
|
||||
menuDef_t *menu = (menuDef_t*)p;
|
||||
playerState_t *ps = &cg.snap->ps;
|
||||
int i, red, blue;
|
||||
red = blue = 0;
|
||||
for (i = 0; i < cg.numScores; i++) {
|
||||
if (cg.scores[i].team == TEAM_RED) {
|
||||
red++;
|
||||
} else if (cg.scores[i].team == TEAM_BLUE) {
|
||||
blue++;
|
||||
}
|
||||
if (ps->clientNum == cg.scores[i].client) {
|
||||
cg.selectedScore = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (menu == NULL) {
|
||||
// just interested in setting the selected score
|
||||
return;
|
||||
}
|
||||
|
||||
if ( cgs.gametype >= GT_TEAM && cgs.ffa_gt!=1) {
|
||||
int feeder = FEEDER_REDTEAM_LIST;
|
||||
i = red;
|
||||
if (cg.scores[cg.selectedScore].team == TEAM_BLUE) {
|
||||
feeder = FEEDER_BLUETEAM_LIST;
|
||||
i = blue;
|
||||
}
|
||||
Menu_SetFeederSelection(menu, feeder, i, NULL);
|
||||
} else {
|
||||
Menu_SetFeederSelection(menu, FEEDER_SCOREBOARD, cg.selectedScore, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: might need to cache this info
|
||||
static clientInfo_t * CG_InfoFromScoreIndex(int index, int team, int *scoreIndex) {
|
||||
int i, count;
|
||||
if ( cgs.gametype >= GT_TEAM && cgs.ffa_gt!=1) {
|
||||
count = 0;
|
||||
for (i = 0; i < cg.numScores; i++) {
|
||||
if (cg.scores[i].team == team) {
|
||||
if (count == index) {
|
||||
*scoreIndex = i;
|
||||
return &cgs.clientinfo[cg.scores[i].client];
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
*scoreIndex = index;
|
||||
return &cgs.clientinfo[ cg.scores[index].client ];
|
||||
}
|
||||
|
||||
static const char *CG_FeederItemText(float feederID, int index, int column, qhandle_t *handle) {
|
||||
gitem_t *item;
|
||||
int scoreIndex = 0;
|
||||
clientInfo_t *info = NULL;
|
||||
int team = -1;
|
||||
score_t *sp = NULL;
|
||||
|
||||
*handle = -1;
|
||||
|
||||
if (feederID == FEEDER_REDTEAM_LIST) {
|
||||
team = TEAM_RED;
|
||||
} else if (feederID == FEEDER_BLUETEAM_LIST) {
|
||||
team = TEAM_BLUE;
|
||||
}
|
||||
|
||||
info = CG_InfoFromScoreIndex(index, team, &scoreIndex);
|
||||
sp = &cg.scores[scoreIndex];
|
||||
|
||||
if (info && info->infoValid) {
|
||||
switch (column) {
|
||||
case 0:
|
||||
if ( info->powerups & ( 1 << PW_NEUTRALFLAG ) ) {
|
||||
item = BG_FindItemForPowerup( PW_NEUTRALFLAG );
|
||||
*handle = cg_items[ ITEM_INDEX(item) ].icon;
|
||||
} else if ( info->powerups & ( 1 << PW_REDFLAG ) ) {
|
||||
item = BG_FindItemForPowerup( PW_REDFLAG );
|
||||
*handle = cg_items[ ITEM_INDEX(item) ].icon;
|
||||
} else if ( info->powerups & ( 1 << PW_BLUEFLAG ) ) {
|
||||
item = BG_FindItemForPowerup( PW_BLUEFLAG );
|
||||
*handle = cg_items[ ITEM_INDEX(item) ].icon;
|
||||
} else {
|
||||
if ( info->botSkill > 0 && info->botSkill <= 5 ) {
|
||||
*handle = cgs.media.botSkillShaders[ info->botSkill - 1 ];
|
||||
} else if ( info->handicap < 100 ) {
|
||||
return va("%i", info->handicap );
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (team == -1) {
|
||||
return "";
|
||||
} else if (info->isDead) {
|
||||
*handle = cgs.media.deathShader;
|
||||
} else {
|
||||
*handle = CG_StatusHandle(info->teamTask);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if ( cg.snap->ps.stats[ STAT_CLIENTS_READY ] & ( 1 << sp->client ) ) {
|
||||
return "Ready";
|
||||
}
|
||||
if (team == -1) {
|
||||
if (cgs.gametype == GT_TOURNAMENT) {
|
||||
return va("%i/%i", info->wins, info->losses);
|
||||
} else if (info->infoValid && info->team == TEAM_SPECTATOR ) {
|
||||
return "Spectator";
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
} else {
|
||||
if (info->teamLeader) {
|
||||
return "Leader";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
return info->name;
|
||||
break;
|
||||
case 4:
|
||||
return va("%i", info->score);
|
||||
break;
|
||||
case 5:
|
||||
return va("%4i", sp->time);
|
||||
break;
|
||||
case 6:
|
||||
if ( sp->ping == -1 ) {
|
||||
return "connecting";
|
||||
}
|
||||
return va("%4i", sp->ping);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
static qhandle_t CG_FeederItemImage(float feederID, int index) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void CG_FeederSelection(float feederID, int index) {
|
||||
if ( cgs.gametype >= GT_TEAM && cgs.ffa_gt!=1) {
|
||||
int i, count;
|
||||
int team = (feederID == FEEDER_REDTEAM_LIST) ? TEAM_RED : TEAM_BLUE;
|
||||
count = 0;
|
||||
for (i = 0; i < cg.numScores; i++) {
|
||||
if (cg.scores[i].team == team) {
|
||||
if (index == count) {
|
||||
cg.selectedScore = i;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cg.selectedScore = index;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MISSIONPACK // bk001204 - only needed there
|
||||
static float CG_Cvar_Get(const char *cvar) {
|
||||
char buff[128];
|
||||
memset(buff, 0, sizeof(buff));
|
||||
trap_Cvar_VariableStringBuffer(cvar, buff, sizeof(buff));
|
||||
return atof(buff);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
void CG_Text_PaintWithCursor(float x, float y, float scale, vec4_t color, const char *text, int cursorPos, char cursor, int limit, int style) {
|
||||
CG_Text_Paint(x, y, scale, color, text, 0, limit, style);
|
||||
}
|
||||
|
||||
static int CG_OwnerDrawWidth(int ownerDraw, float scale) {
|
||||
switch (ownerDraw) {
|
||||
case CG_GAME_TYPE:
|
||||
return CG_Text_Width(CG_GameTypeString(), scale, 0);
|
||||
case CG_GAME_STATUS:
|
||||
return CG_Text_Width(CG_GetGameStatusText(), scale, 0);
|
||||
break;
|
||||
case CG_KILLER:
|
||||
return CG_Text_Width(CG_GetKillerText(), scale, 0);
|
||||
break;
|
||||
case CG_RED_NAME:
|
||||
return CG_Text_Width(cg_redTeamName.string, scale, 0);
|
||||
break;
|
||||
case CG_BLUE_NAME:
|
||||
return CG_Text_Width(cg_blueTeamName.string, scale, 0);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int CG_PlayCinematic(const char *name, float x, float y, float w, float h) {
|
||||
return trap_CIN_PlayCinematic(name, x, y, w, h, CIN_loop);
|
||||
}
|
||||
|
||||
static void CG_StopCinematic(int handle) {
|
||||
trap_CIN_StopCinematic(handle);
|
||||
}
|
||||
|
||||
static void CG_DrawCinematic(int handle, float x, float y, float w, float h) {
|
||||
trap_CIN_SetExtents(handle, x, y, w, h);
|
||||
trap_CIN_DrawCinematic(handle);
|
||||
}
|
||||
|
||||
static void CG_RunCinematicFrame(int handle) {
|
||||
trap_CIN_RunCinematic(handle);
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
CG_LoadHudMenu();
|
||||
|
||||
=================
|
||||
*/
|
||||
void CG_LoadHudMenu( void ) {
|
||||
char buff[1024];
|
||||
const char *hudSet;
|
||||
|
||||
cgDC.registerShaderNoMip = &trap_R_RegisterShaderNoMip;
|
||||
cgDC.setColor = &trap_R_SetColor;
|
||||
cgDC.drawHandlePic = &CG_DrawPic;
|
||||
cgDC.drawStretchPic = &trap_R_DrawStretchPic;
|
||||
cgDC.drawText = &CG_Text_Paint;
|
||||
cgDC.textWidth = &CG_Text_Width;
|
||||
cgDC.textHeight = &CG_Text_Height;
|
||||
cgDC.registerModel = &trap_R_RegisterModel;
|
||||
cgDC.modelBounds = &trap_R_ModelBounds;
|
||||
cgDC.fillRect = &CG_FillRect;
|
||||
cgDC.drawRect = &CG_DrawRect;
|
||||
cgDC.drawSides = &CG_DrawSides;
|
||||
cgDC.drawTopBottom = &CG_DrawTopBottom;
|
||||
cgDC.clearScene = &trap_R_ClearScene;
|
||||
cgDC.addRefEntityToScene = &trap_R_AddRefEntityToScene;
|
||||
cgDC.renderScene = &trap_R_RenderScene;
|
||||
cgDC.registerFont = &trap_R_RegisterFont;
|
||||
cgDC.ownerDrawItem = &CG_OwnerDraw;
|
||||
cgDC.getValue = &CG_GetValue;
|
||||
cgDC.ownerDrawVisible = &CG_OwnerDrawVisible;
|
||||
cgDC.runScript = &CG_RunMenuScript;
|
||||
cgDC.getTeamColor = &CG_GetTeamColor;
|
||||
cgDC.setCVar = trap_Cvar_Set;
|
||||
cgDC.getCVarString = trap_Cvar_VariableStringBuffer;
|
||||
cgDC.getCVarValue = CG_Cvar_Get;
|
||||
cgDC.drawTextWithCursor = &CG_Text_PaintWithCursor;
|
||||
//cgDC.setOverstrikeMode = &trap_Key_SetOverstrikeMode;
|
||||
//cgDC.getOverstrikeMode = &trap_Key_GetOverstrikeMode;
|
||||
cgDC.startLocalSound = &trap_S_StartLocalSound;
|
||||
cgDC.ownerDrawHandleKey = &CG_OwnerDrawHandleKey;
|
||||
cgDC.feederCount = &CG_FeederCount;
|
||||
cgDC.feederItemImage = &CG_FeederItemImage;
|
||||
cgDC.feederItemText = &CG_FeederItemText;
|
||||
cgDC.feederSelection = &CG_FeederSelection;
|
||||
//cgDC.setBinding = &trap_Key_SetBinding;
|
||||
//cgDC.getBindingBuf = &trap_Key_GetBindingBuf;
|
||||
//cgDC.keynumToStringBuf = &trap_Key_KeynumToStringBuf;
|
||||
//cgDC.executeText = &trap_Cmd_ExecuteText;
|
||||
cgDC.Error = &Com_Error;
|
||||
cgDC.Print = &Com_Printf;
|
||||
cgDC.ownerDrawWidth = &CG_OwnerDrawWidth;
|
||||
//cgDC.Pause = &CG_Pause;
|
||||
cgDC.registerSound = &trap_S_RegisterSound;
|
||||
cgDC.startBackgroundTrack = &trap_S_StartBackgroundTrack;
|
||||
cgDC.stopBackgroundTrack = &trap_S_StopBackgroundTrack;
|
||||
cgDC.playCinematic = &CG_PlayCinematic;
|
||||
cgDC.stopCinematic = &CG_StopCinematic;
|
||||
cgDC.drawCinematic = &CG_DrawCinematic;
|
||||
cgDC.runCinematicFrame = &CG_RunCinematicFrame;
|
||||
|
||||
Init_Display(&cgDC);
|
||||
|
||||
Menu_Reset();
|
||||
|
||||
trap_Cvar_VariableStringBuffer("cg_hudFiles", buff, sizeof(buff));
|
||||
hudSet = buff;
|
||||
if (hudSet[0] == '\0') {
|
||||
hudSet = "ui/hud.txt";
|
||||
}
|
||||
|
||||
CG_LoadMenus(hudSet);
|
||||
}
|
||||
|
||||
void CG_AssetCache( void ) {
|
||||
//if (Assets.textFont == NULL) {
|
||||
// trap_R_RegisterFont("fonts/arial.ttf", 72, &Assets.textFont);
|
||||
//}
|
||||
//Assets.background = trap_R_RegisterShaderNoMip( ASSET_BACKGROUND );
|
||||
//Com_Printf("Menu Size: %i bytes\n", sizeof(Menus));
|
||||
cgDC.Assets.gradientBar = trap_R_RegisterShaderNoMip( ASSET_GRADIENTBAR );
|
||||
cgDC.Assets.fxBasePic = trap_R_RegisterShaderNoMip( ART_FX_BASE );
|
||||
cgDC.Assets.fxPic[0] = trap_R_RegisterShaderNoMip( ART_FX_RED );
|
||||
cgDC.Assets.fxPic[1] = trap_R_RegisterShaderNoMip( ART_FX_YELLOW );
|
||||
cgDC.Assets.fxPic[2] = trap_R_RegisterShaderNoMip( ART_FX_GREEN );
|
||||
cgDC.Assets.fxPic[3] = trap_R_RegisterShaderNoMip( ART_FX_TEAL );
|
||||
cgDC.Assets.fxPic[4] = trap_R_RegisterShaderNoMip( ART_FX_BLUE );
|
||||
cgDC.Assets.fxPic[5] = trap_R_RegisterShaderNoMip( ART_FX_CYAN );
|
||||
cgDC.Assets.fxPic[6] = trap_R_RegisterShaderNoMip( ART_FX_WHITE );
|
||||
cgDC.Assets.scrollBar = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR );
|
||||
cgDC.Assets.scrollBarArrowDown = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWDOWN );
|
||||
cgDC.Assets.scrollBarArrowUp = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWUP );
|
||||
cgDC.Assets.scrollBarArrowLeft = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWLEFT );
|
||||
cgDC.Assets.scrollBarArrowRight = trap_R_RegisterShaderNoMip( ASSET_SCROLLBAR_ARROWRIGHT );
|
||||
cgDC.Assets.scrollBarThumb = trap_R_RegisterShaderNoMip( ASSET_SCROLL_THUMB );
|
||||
cgDC.Assets.sliderBar = trap_R_RegisterShaderNoMip( ASSET_SLIDER_BAR );
|
||||
cgDC.Assets.sliderThumb = trap_R_RegisterShaderNoMip( ASSET_SLIDER_THUMB );
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
=================
|
||||
CG_Init
|
||||
@@ -2138,10 +1357,6 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ) {
|
||||
|
||||
trap_CM_LoadMap( cgs.mapname );
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
String_Init();
|
||||
#endif
|
||||
|
||||
cg.loading = qtrue; // force players to load instead of defer
|
||||
|
||||
CG_LoadingString( "sounds" );
|
||||
@@ -2156,11 +1371,6 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ) {
|
||||
|
||||
CG_RegisterClients(); // if low on memory, some clients will be deferred
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
CG_AssetCache();
|
||||
CG_LoadHudMenu(); // load new hud stuff
|
||||
#endif
|
||||
|
||||
cg.loading = qfalse; // future players will be deferred
|
||||
|
||||
CG_InitLocalEntities();
|
||||
@@ -2177,10 +1387,6 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ) {
|
||||
|
||||
CG_LoadingString( "" );
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
CG_InitTeamChat();
|
||||
#endif
|
||||
|
||||
CG_ShaderStateChanged();
|
||||
|
||||
//Init challenge system
|
||||
@@ -2214,7 +1420,6 @@ CG_EventHandling
|
||||
2 - hud editor
|
||||
|
||||
*/
|
||||
#ifndef MISSIONPACK
|
||||
void CG_EventHandling(int type) {
|
||||
}
|
||||
|
||||
@@ -2225,7 +1430,6 @@ void CG_KeyEvent(int key, qboolean down) {
|
||||
|
||||
void CG_MouseEvent(int x, int y) {
|
||||
}
|
||||
#endif
|
||||
|
||||
//unlagged - attack prediction #3
|
||||
// moved from g_weapon.c
|
||||
|
@@ -2016,4 +2016,4 @@ void CG_ParticleMisc (qhandle_t pshader, vec3_t origin, int size, int duration,
|
||||
|
||||
p->rotate = qfalse;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -656,18 +656,6 @@ static void CG_LoadClientInfo( int clientNum, clientInfo_t *ci ) {
|
||||
char teamname[MAX_QPATH];
|
||||
|
||||
teamname[0] = 0;
|
||||
#ifdef MISSIONPACK
|
||||
if( cgs.gametype >= GT_TEAM && cgs.ffa_gt!=1) {
|
||||
if( ci->team == TEAM_BLUE ) {
|
||||
Q_strncpyz(teamname, cg_blueTeamName.string, sizeof(teamname) );
|
||||
} else {
|
||||
Q_strncpyz(teamname, cg_redTeamName.string, sizeof(teamname) );
|
||||
}
|
||||
}
|
||||
if( teamname[0] ) {
|
||||
strcat( teamname, "/" );
|
||||
}
|
||||
#endif
|
||||
modelloaded = qtrue;
|
||||
if ( !CG_RegisterClientModelname( ci, ci->modelName, ci->skinName, ci->headModelName, ci->headSkinName, teamname ) ) {
|
||||
if ( cg_buildScript.integer ) {
|
||||
|
@@ -52,9 +52,7 @@ void CG_CheckAmmo( void ) {
|
||||
case WP_GRENADE_LAUNCHER:
|
||||
case WP_RAILGUN:
|
||||
case WP_SHOTGUN:
|
||||
//#ifdef MISSIONPACK
|
||||
case WP_PROX_LAUNCHER:
|
||||
//#endif
|
||||
total += cg.snap->ps.ammo[i] * 1000;
|
||||
break;
|
||||
default:
|
||||
@@ -308,17 +306,7 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
|
||||
if ( ps->persistant[PERS_HITS] > ops->persistant[PERS_HITS] ) {
|
||||
armor = ps->persistant[PERS_ATTACKEE_ARMOR] & 0xff;
|
||||
health = ps->persistant[PERS_ATTACKEE_ARMOR] >> 8;
|
||||
#ifdef MISSIONPACK
|
||||
if (armor > 50 ) {
|
||||
trap_S_StartLocalSound( cgs.media.hitSoundHighArmor, CHAN_LOCAL_SOUND );
|
||||
} else if (armor || health > 100) {
|
||||
trap_S_StartLocalSound( cgs.media.hitSoundLowArmor, CHAN_LOCAL_SOUND );
|
||||
} else {
|
||||
trap_S_StartLocalSound( cgs.media.hitSound, CHAN_LOCAL_SOUND );
|
||||
}
|
||||
#else
|
||||
trap_S_StartLocalSound( cgs.media.hitSound, CHAN_LOCAL_SOUND );
|
||||
#endif
|
||||
} else if ( ps->persistant[PERS_HITS] < ops->persistant[PERS_HITS] ) {
|
||||
trap_S_StartLocalSound( cgs.media.hitTeamSound, CHAN_LOCAL_SOUND );
|
||||
}
|
||||
@@ -344,15 +332,7 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
|
||||
//Com_Printf("capture\n");
|
||||
}
|
||||
if (ps->persistant[PERS_IMPRESSIVE_COUNT] != ops->persistant[PERS_IMPRESSIVE_COUNT]) {
|
||||
#ifdef MISSIONPACK
|
||||
if (ps->persistant[PERS_IMPRESSIVE_COUNT] == 1) {
|
||||
sfx = cgs.media.firstImpressiveSound;
|
||||
} else {
|
||||
sfx = cgs.media.impressiveSound;
|
||||
}
|
||||
#else
|
||||
sfx = cgs.media.impressiveSound;
|
||||
#endif
|
||||
pushReward(sfx, cgs.media.medalImpressive, ps->persistant[PERS_IMPRESSIVE_COUNT]);
|
||||
reward = qtrue;
|
||||
//Com_Printf("impressive\n");
|
||||
@@ -360,31 +340,14 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
|
||||
//KK-OAX We Just Won't Draw The Excellent Stuff if Multikills are Enabled!!!
|
||||
if( !cgs.altExcellent ) {
|
||||
if (ps->persistant[PERS_EXCELLENT_COUNT] != ops->persistant[PERS_EXCELLENT_COUNT]) {
|
||||
#ifdef MISSIONPACK
|
||||
if (ps->persistant[PERS_EXCELLENT_COUNT] == 1) {
|
||||
sfx = cgs.media.firstExcellentSound;
|
||||
} else {
|
||||
sfx = cgs.media.excellentSound;
|
||||
}
|
||||
#else
|
||||
sfx = cgs.media.excellentSound;
|
||||
#endif
|
||||
|
||||
pushReward(sfx, cgs.media.medalExcellent, ps->persistant[PERS_EXCELLENT_COUNT]);
|
||||
reward = qtrue;
|
||||
//Com_Printf("excellent\n");
|
||||
}
|
||||
}
|
||||
if (ps->persistant[PERS_GAUNTLET_FRAG_COUNT] != ops->persistant[PERS_GAUNTLET_FRAG_COUNT]) {
|
||||
#ifdef MISSIONPACK
|
||||
if (ops->persistant[PERS_GAUNTLET_FRAG_COUNT] == 1) {
|
||||
sfx = cgs.media.firstHumiliationSound;
|
||||
} else {
|
||||
sfx = cgs.media.humiliationSound;
|
||||
}
|
||||
#else
|
||||
sfx = cgs.media.humiliationSound;
|
||||
#endif
|
||||
pushReward(sfx, cgs.media.medalGauntlet, ps->persistant[PERS_GAUNTLET_FRAG_COUNT]);
|
||||
reward = qtrue;
|
||||
//Com_Printf("guantlet frag\n");
|
||||
|
@@ -157,20 +157,6 @@ static void CG_DrawClientScore( int y, score_t *score, float *color, float fade,
|
||||
CG_DrawHead( headx, y, 16, 16, score->client, headAngles );
|
||||
}
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
// draw the team task
|
||||
if ( ci->teamTask != TEAMTASK_NONE ) {
|
||||
if (ci->isDead) {
|
||||
CG_DrawPic( headx + 48, y, 16, 16, cgs.media.deathShader );
|
||||
}
|
||||
else if ( ci->teamTask == TEAMTASK_OFFENSE ) {
|
||||
CG_DrawPic( headx + 48, y, 16, 16, cgs.media.assaultShader );
|
||||
}
|
||||
else if ( ci->teamTask == TEAMTASK_DEFENSE ) {
|
||||
CG_DrawPic( headx + 48, y, 16, 16, cgs.media.defendShader );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// draw the score line
|
||||
if ( score->ping == -1 ) {
|
||||
Com_sprintf(string, sizeof(string),
|
||||
|
@@ -46,18 +46,6 @@ static const orderTask_t validOrders[] = {
|
||||
|
||||
static const int numValidOrders = sizeof(validOrders) / sizeof(orderTask_t);
|
||||
|
||||
#ifdef MISSIONPACK // bk001204
|
||||
static int CG_ValidOrder(const char *p) {
|
||||
int i;
|
||||
for (i = 0; i < numValidOrders; i++) {
|
||||
if (Q_stricmp(p, validOrders[i].order) == 0) {
|
||||
return validOrders[i].taskNum;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
=================
|
||||
CG_ParseScores
|
||||
@@ -117,10 +105,6 @@ static void CG_ParseScores( void ) {
|
||||
|
||||
cg.scores[i].team = cgs.clientinfo[cg.scores[i].client].team;
|
||||
}
|
||||
#ifdef MISSIONPACK
|
||||
CG_SetScoreSelection(NULL);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
static void CG_ParseAccuracy( void ) {
|
||||
@@ -397,15 +381,8 @@ static void CG_ParseWarmup( void ) {
|
||||
|
||||
if ( warmup == 0 && cg.warmup ) {
|
||||
|
||||
} else if ( warmup > 0 && cg.warmup <= 0 ) {
|
||||
#ifdef MISSIONPACK
|
||||
if (cgs.gametype >= GT_CTF && cgs.gametype < GT_MAX_GAME_TYPE && !cgs.ffa_gt) {
|
||||
trap_S_StartLocalSound( cgs.media.countPrepareTeamSound, CHAN_ANNOUNCER );
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
trap_S_StartLocalSound( cgs.media.countPrepareSound, CHAN_ANNOUNCER );
|
||||
}
|
||||
} else if ( warmup > 0 && cg.warmup <= 0 ) {
|
||||
trap_S_StartLocalSound( cgs.media.countPrepareSound, CHAN_ANNOUNCER );
|
||||
}
|
||||
|
||||
cg.warmup = warmup;
|
||||
@@ -429,12 +406,10 @@ void CG_SetConfigValues( void ) {
|
||||
cgs.redflag = s[0] - '0';
|
||||
cgs.blueflag = s[1] - '0';
|
||||
}
|
||||
//#ifdef MISSIONPACK
|
||||
else if( cgs.gametype == GT_1FCTF ) {
|
||||
s = CG_ConfigString( CS_FLAGSTATUS );
|
||||
cgs.flagStatus = s[0] - '0';
|
||||
}
|
||||
//#endif
|
||||
cg.warmup = atoi( CG_ConfigString( CS_WARMUP ) );
|
||||
}
|
||||
|
||||
@@ -521,9 +496,6 @@ static void CG_ConfigStringModified( void ) {
|
||||
cgs.voteModified = qtrue;
|
||||
} else if ( num == CS_VOTE_STRING ) {
|
||||
Q_strncpyz( cgs.voteString, str, sizeof( cgs.voteString ) );
|
||||
#ifdef MISSIONPACK
|
||||
trap_S_StartLocalSound( cgs.media.voteNow, CHAN_ANNOUNCER );
|
||||
#endif //MISSIONPACK
|
||||
} else if ( num >= CS_TEAMVOTE_TIME && num <= CS_TEAMVOTE_TIME + 1) {
|
||||
cgs.teamVoteTime[num-CS_TEAMVOTE_TIME] = atoi( str );
|
||||
cgs.teamVoteModified[num-CS_TEAMVOTE_TIME] = qtrue;
|
||||
@@ -535,9 +507,6 @@ static void CG_ConfigStringModified( void ) {
|
||||
cgs.teamVoteModified[num-CS_TEAMVOTE_NO] = qtrue;
|
||||
} else if ( num >= CS_TEAMVOTE_STRING && num <= CS_TEAMVOTE_STRING + 1) {
|
||||
Q_strncpyz( cgs.teamVoteString[num-CS_TEAMVOTE_STRING], str, sizeof( cgs.teamVoteString ) );
|
||||
#ifdef MISSIONPACK
|
||||
trap_S_StartLocalSound( cgs.media.voteNow, CHAN_ANNOUNCER );
|
||||
#endif
|
||||
} else if ( num == CS_INTERMISSION ) {
|
||||
cg.intermissionStarted = atoi( str );
|
||||
} else if ( num >= CS_MODELS && num < CS_MODELS+MAX_MODELS ) {
|
||||
@@ -555,11 +524,9 @@ static void CG_ConfigStringModified( void ) {
|
||||
cgs.redflag = str[0] - '0';
|
||||
cgs.blueflag = str[1] - '0';
|
||||
}
|
||||
//#ifdef MISSIONPACK
|
||||
else if( cgs.gametype == GT_1FCTF ) {
|
||||
cgs.flagStatus = str[0] - '0';
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
else if ( num == CS_SHADERSTATE ) {
|
||||
CG_ShaderStateChanged();
|
||||
@@ -683,14 +650,6 @@ static void CG_MapRestart( void ) {
|
||||
trap_S_StartLocalSound( cgs.media.countFightSound, CHAN_ANNOUNCER );
|
||||
CG_CenterPrint( "FIGHT!", 120, GIANTCHAR_WIDTH*2 );
|
||||
}
|
||||
#ifdef MISSIONPACK
|
||||
if (cg_singlePlayerActive.integer) {
|
||||
trap_Cvar_Set("ui_matchStartTime", va("%i", cg.time));
|
||||
if (cg_recordSPDemo.integer && cg_recordSPDemoName.string && *cg_recordSPDemoName.string) {
|
||||
trap_SendConsoleCommand(va("set g_synchronousclients 1 ; record %s \n", cg_recordSPDemoName.string));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
trap_Cvar_Set("cg_thirdPerson", "0");
|
||||
}
|
||||
|
||||
@@ -1018,157 +977,6 @@ typedef struct bufferedVoiceChat_s
|
||||
|
||||
bufferedVoiceChat_t voiceChatBuffer[MAX_VOICECHATBUFFER];
|
||||
|
||||
/*
|
||||
=================
|
||||
CG_PlayVoiceChat
|
||||
=================
|
||||
*/
|
||||
void CG_PlayVoiceChat( bufferedVoiceChat_t *vchat ) {
|
||||
#ifdef MISSIONPACK
|
||||
// if we are going into the intermission, don't start any voices
|
||||
if ( cg.intermissionStarted ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !cg_noVoiceChats.integer ) {
|
||||
trap_S_StartLocalSound( vchat->snd, CHAN_VOICE);
|
||||
if (vchat->clientNum != cg.snap->ps.clientNum) {
|
||||
int orderTask = CG_ValidOrder(vchat->cmd);
|
||||
if (orderTask > 0) {
|
||||
cgs.acceptOrderTime = cg.time + 5000;
|
||||
Q_strncpyz(cgs.acceptVoice, vchat->cmd, sizeof(cgs.acceptVoice));
|
||||
cgs.acceptTask = orderTask;
|
||||
cgs.acceptLeader = vchat->clientNum;
|
||||
}
|
||||
// see if this was an order
|
||||
CG_ShowResponseHead();
|
||||
}
|
||||
}
|
||||
if (!vchat->voiceOnly && !cg_noVoiceText.integer) {
|
||||
CG_AddToTeamChat( vchat->message );
|
||||
CG_Printf( "%s\n", vchat->message );
|
||||
}
|
||||
voiceChatBuffer[cg.voiceChatBufferOut].snd = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
=====================
|
||||
CG_PlayBufferedVoieChats
|
||||
=====================
|
||||
*/
|
||||
void CG_PlayBufferedVoiceChats( void ) {
|
||||
#ifdef MISSIONPACK
|
||||
if ( cg.voiceChatTime < cg.time ) {
|
||||
if (cg.voiceChatBufferOut != cg.voiceChatBufferIn && voiceChatBuffer[cg.voiceChatBufferOut].snd) {
|
||||
//
|
||||
CG_PlayVoiceChat(&voiceChatBuffer[cg.voiceChatBufferOut]);
|
||||
//
|
||||
cg.voiceChatBufferOut = (cg.voiceChatBufferOut + 1) % MAX_VOICECHATBUFFER;
|
||||
cg.voiceChatTime = cg.time + 1000;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
=====================
|
||||
CG_AddBufferedVoiceChat
|
||||
=====================
|
||||
*/
|
||||
void CG_AddBufferedVoiceChat( bufferedVoiceChat_t *vchat ) {
|
||||
#ifdef MISSIONPACK
|
||||
// if we are going into the intermission, don't start any voices
|
||||
if ( cg.intermissionStarted ) {
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy(&voiceChatBuffer[cg.voiceChatBufferIn], vchat, sizeof(bufferedVoiceChat_t));
|
||||
cg.voiceChatBufferIn = (cg.voiceChatBufferIn + 1) % MAX_VOICECHATBUFFER;
|
||||
if (cg.voiceChatBufferIn == cg.voiceChatBufferOut) {
|
||||
CG_PlayVoiceChat( &voiceChatBuffer[cg.voiceChatBufferOut] );
|
||||
cg.voiceChatBufferOut++;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
CG_VoiceChatLocal
|
||||
=================
|
||||
*/
|
||||
void CG_VoiceChatLocal( int mode, qboolean voiceOnly, int clientNum, int color, const char *cmd ) {
|
||||
#ifdef MISSIONPACK
|
||||
char *chat;
|
||||
voiceChatList_t *voiceChatList;
|
||||
clientInfo_t *ci;
|
||||
sfxHandle_t snd;
|
||||
bufferedVoiceChat_t vchat;
|
||||
|
||||
// if we are going into the intermission, don't start any voices
|
||||
if ( cg.intermissionStarted ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) {
|
||||
clientNum = 0;
|
||||
}
|
||||
ci = &cgs.clientinfo[ clientNum ];
|
||||
|
||||
cgs.currentVoiceClient = clientNum;
|
||||
|
||||
voiceChatList = CG_VoiceChatListForClient( clientNum );
|
||||
|
||||
if ( CG_GetVoiceChat( voiceChatList, cmd, &snd, &chat ) ) {
|
||||
//
|
||||
if ( mode == SAY_TEAM || !cg_teamChatsOnly.integer ) {
|
||||
vchat.clientNum = clientNum;
|
||||
vchat.snd = snd;
|
||||
vchat.voiceOnly = voiceOnly;
|
||||
Q_strncpyz(vchat.cmd, cmd, sizeof(vchat.cmd));
|
||||
if ( mode == SAY_TELL ) {
|
||||
Com_sprintf(vchat.message, sizeof(vchat.message), "[%s]: %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat);
|
||||
}
|
||||
else if ( mode == SAY_TEAM ) {
|
||||
Com_sprintf(vchat.message, sizeof(vchat.message), "(%s): %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat);
|
||||
}
|
||||
else {
|
||||
Com_sprintf(vchat.message, sizeof(vchat.message), "%s: %c%c%s", ci->name, Q_COLOR_ESCAPE, color, chat);
|
||||
}
|
||||
CG_AddBufferedVoiceChat(&vchat);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
CG_VoiceChat
|
||||
=================
|
||||
*/
|
||||
void CG_VoiceChat( int mode ) {
|
||||
#ifdef MISSIONPACK
|
||||
const char *cmd;
|
||||
int clientNum, color;
|
||||
qboolean voiceOnly;
|
||||
|
||||
voiceOnly = atoi(CG_Argv(1));
|
||||
clientNum = atoi(CG_Argv(2));
|
||||
color = atoi(CG_Argv(3));
|
||||
cmd = CG_Argv(4);
|
||||
|
||||
if (cg_noTaunt.integer != 0) {
|
||||
if (!strcmp(cmd, VOICECHAT_KILLINSULT) || !strcmp(cmd, VOICECHAT_TAUNT) || \
|
||||
!strcmp(cmd, VOICECHAT_DEATHINSULT) || !strcmp(cmd, VOICECHAT_KILLGAUNTLET) || \
|
||||
!strcmp(cmd, VOICECHAT_PRAISE)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
CG_VoiceChatLocal( mode, voiceOnly, clientNum, color, cmd );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
CG_RemoveChatEscapeChar
|
||||
@@ -1217,15 +1025,6 @@ static void CG_ServerCommand( void ) {
|
||||
|
||||
if ( !strcmp( cmd, "print" ) ) {
|
||||
CG_Printf( "%s", CG_Argv(1) );
|
||||
#ifdef MISSIONPACK
|
||||
cmd = CG_Argv(1); // yes, this is obviously a hack, but so is the way we hear about
|
||||
// votes passing or failing
|
||||
if ( !Q_stricmpn( cmd, "vote failed", 11 ) || !Q_stricmpn( cmd, "team vote failed", 16 )) {
|
||||
trap_S_StartLocalSound( cgs.media.voteFailed, CHAN_ANNOUNCER );
|
||||
} else if ( !Q_stricmpn( cmd, "vote passed", 11 ) || !Q_stricmpn( cmd, "team vote passed", 16 ) ) {
|
||||
trap_S_StartLocalSound( cgs.media.votePassed, CHAN_ANNOUNCER );
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1249,21 +1048,6 @@ static void CG_ServerCommand( void ) {
|
||||
CG_Printf( "%s\n", text );
|
||||
return;
|
||||
}
|
||||
if ( !strcmp( cmd, "vchat" ) ) {
|
||||
CG_VoiceChat( SAY_ALL );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !strcmp( cmd, "vtchat" ) ) {
|
||||
CG_VoiceChat( SAY_TEAM );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !strcmp( cmd, "vtell" ) ) {
|
||||
CG_VoiceChat( SAY_TELL );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !strcmp( cmd, "scores" ) ) {
|
||||
CG_ParseScores();
|
||||
return;
|
||||
|
@@ -55,7 +55,7 @@ CG_TransitionEntity
|
||||
cent->nextState is moved to cent->currentState and events are fired
|
||||
===============
|
||||
*/
|
||||
//unlagged - early transitioning
|
||||
//unlagged - early transitioning
|
||||
// used to be static, now needed to transition entities from within cg_ents.c
|
||||
void CG_TransitionEntity( centity_t *cent ) {
|
||||
cent->currentState = cent->nextState;
|
||||
|
@@ -836,9 +836,6 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demo
|
||||
// add buffered sounds
|
||||
CG_PlayBufferedSounds();
|
||||
|
||||
// play buffered voice chats
|
||||
CG_PlayBufferedVoiceChats();
|
||||
|
||||
// finish up the rest of the refdef
|
||||
if ( cg.testModelEntity.hModel ) {
|
||||
CG_AddTestModel();
|
||||
|
@@ -175,7 +175,6 @@ static void CG_ShotgunEjectBrass( centity_t *cent ) {
|
||||
}
|
||||
|
||||
|
||||
//#ifdef MISSIONPACK
|
||||
/*
|
||||
==========================
|
||||
CG_NailgunEjectBrass
|
||||
@@ -516,7 +515,6 @@ static void CG_LeiPlasmaTrail( centity_t *ent, const weaponInfo_t *wi ) {
|
||||
}
|
||||
|
||||
|
||||
//#ifdef MISSIONPACK
|
||||
/*
|
||||
==========================
|
||||
CG_NailTrail
|
||||
@@ -872,7 +870,6 @@ void CG_RegisterWeapon( int weaponNum ) {
|
||||
//cgs.media.lightningShader = trap_R_RegisterShader( "lightningBoltNew");
|
||||
break;
|
||||
|
||||
//#ifdef MISSIONPACK
|
||||
case WP_CHAINGUN:
|
||||
weaponInfo->firingSound = trap_S_RegisterSound( "sound/weapons/vulcan/wvulfire.wav", qfalse );
|
||||
weaponInfo->loopFireSound = qtrue;
|
||||
@@ -884,7 +881,6 @@ void CG_RegisterWeapon( int weaponNum ) {
|
||||
weaponInfo->ejectBrassFunc = CG_MachineGunEjectBrass;
|
||||
cgs.media.bulletExplosionShader = trap_R_RegisterShader( "bulletExplosion" );
|
||||
break;
|
||||
//#endif
|
||||
|
||||
case WP_MACHINEGUN:
|
||||
MAKERGB( weaponInfo->flashDlightColor, 1, 1, 0 );
|
||||
@@ -917,7 +913,6 @@ void CG_RegisterWeapon( int weaponNum ) {
|
||||
cgs.media.rocketExplosionShader = trap_R_RegisterShader( "rocketExplosion" );
|
||||
break;
|
||||
|
||||
//#ifdef MISSIONPACK
|
||||
case WP_PROX_LAUNCHER:
|
||||
weaponInfo->missileModel = trap_R_RegisterModel( "models/weaphits/proxmine.md3" );
|
||||
weaponInfo->missileTrailFunc = CG_GrenadeTrail;
|
||||
@@ -927,7 +922,6 @@ void CG_RegisterWeapon( int weaponNum ) {
|
||||
weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/proxmine/wstbfire.wav", qfalse );
|
||||
cgs.media.grenadeExplosionShader = trap_R_RegisterShader( "grenadeExplosion" );
|
||||
break;
|
||||
//#endif
|
||||
|
||||
case WP_GRENADE_LAUNCHER:
|
||||
weaponInfo->missileModel = trap_R_RegisterModel( "models/ammo/grenade1.md3" );
|
||||
@@ -939,7 +933,6 @@ void CG_RegisterWeapon( int weaponNum ) {
|
||||
cgs.media.grenadeExplosionShader = trap_R_RegisterShader( "grenadeExplosion" );
|
||||
break;
|
||||
|
||||
//#ifdef MISSIONPACK
|
||||
case WP_NAILGUN:
|
||||
weaponInfo->ejectBrassFunc = CG_NailgunEjectBrass;
|
||||
weaponInfo->missileTrailFunc = CG_NailTrail;
|
||||
@@ -950,7 +943,6 @@ void CG_RegisterWeapon( int weaponNum ) {
|
||||
MAKERGB( weaponInfo->flashDlightColor, 1, 0.75f, 0 );
|
||||
weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/nailgun/wnalfire.wav", qfalse );
|
||||
break;
|
||||
//#endif
|
||||
|
||||
case WP_PLASMAGUN:
|
||||
// weaponInfo->missileModel = cgs.media.invulnerabilityPowerupModel;
|
||||
@@ -1358,11 +1350,9 @@ static float CG_MachinegunSpinAngle( centity_t *cent ) {
|
||||
cent->pe.barrelTime = cg.time;
|
||||
cent->pe.barrelAngle = AngleMod( angle );
|
||||
cent->pe.barrelSpinning = !!(cent->currentState.eFlags & EF_FIRING);
|
||||
//#ifdef MISSIONPACK
|
||||
if ( cent->currentState.weapon == WP_CHAINGUN && !cent->pe.barrelSpinning ) {
|
||||
trap_S_StartSound( NULL, cent->currentState.number, CHAN_WEAPON, trap_S_RegisterSound( "sound/weapons/vulcan/wvulwind.wav", qfalse ) );
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
||||
return angle;
|
||||
@@ -2815,7 +2805,6 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin, vec3_t dir, im
|
||||
|
||||
switch ( weapon ) {
|
||||
default:
|
||||
//#ifdef MISSIONPACK
|
||||
case WP_NAILGUN:
|
||||
if( soundType == IMPACTSOUND_FLESH ) {
|
||||
sfx = cgs.media.sfx_nghitflesh;
|
||||
@@ -2827,7 +2816,6 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin, vec3_t dir, im
|
||||
mark = cgs.media.holeMarkShader;
|
||||
radius = 12;
|
||||
break;
|
||||
//#endif
|
||||
case WP_LIGHTNING:
|
||||
// no explosion at LG impact, it is added with the beam
|
||||
r = rand() & 3;
|
||||
@@ -2841,7 +2829,6 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin, vec3_t dir, im
|
||||
mark = cgs.media.holeMarkShader;
|
||||
radius = 12;
|
||||
break;
|
||||
//#ifdef MISSIONPACK
|
||||
case WP_PROX_LAUNCHER:
|
||||
mod = cgs.media.dishFlashModel;
|
||||
shader = cgs.media.grenadeExplosionShader;
|
||||
@@ -3005,7 +2992,6 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin, vec3_t dir, im
|
||||
radius = 4;
|
||||
break;
|
||||
|
||||
//#ifdef MISSIONPACK
|
||||
case WP_CHAINGUN:
|
||||
mod = cgs.media.bulletFlashModel;
|
||||
if( soundType == IMPACTSOUND_FLESH ) {
|
||||
@@ -3149,11 +3135,9 @@ void CG_MissileHitPlayer( int weapon, vec3_t origin, vec3_t dir, int entityNum )
|
||||
switch ( weapon ) {
|
||||
case WP_GRENADE_LAUNCHER:
|
||||
case WP_ROCKET_LAUNCHER:
|
||||
//#ifdef MISSIONPACK
|
||||
case WP_NAILGUN:
|
||||
case WP_CHAINGUN:
|
||||
case WP_PROX_LAUNCHER:
|
||||
//#endif
|
||||
CG_MissileHitWall( weapon, 0, origin, dir, IMPACTSOUND_FLESH );
|
||||
break;
|
||||
default:
|
||||
|
@@ -52,10 +52,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#include "syn.h" //synonyms
|
||||
#include "match.h" //string matching types and vars
|
||||
|
||||
// for the voice chats
|
||||
#ifdef MISSIONPACK // bk001205
|
||||
#include "../../ui/menudef.h"
|
||||
#endif
|
||||
|
||||
#define TIME_BETWEENCHATTING 25
|
||||
|
||||
|
@@ -1151,7 +1151,6 @@ void BotMatch_TaskPreference(bot_state_t *bs, bot_match_t *match) {
|
||||
EasyClientName(teammate, teammatename, sizeof(teammatename));
|
||||
BotAI_BotInitialChat(bs, "keepinmind", teammatename, NULL);
|
||||
trap_BotEnterChat(bs->cs, teammate, CHAT_TELL);
|
||||
BotVoiceChatOnly(bs, teammate, VOICECHAT_YES);
|
||||
trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
|
||||
}
|
||||
|
||||
@@ -1383,7 +1382,6 @@ void BotMatch_Suicide(bot_state_t *bs, bot_match_t *match) {
|
||||
trap_BotMatchVariable(match, NETNAME, netname, sizeof(netname));
|
||||
client = ClientFromName(netname);
|
||||
//
|
||||
BotVoiceChat(bs, client, VOICECHAT_TAUNT);
|
||||
trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
|
||||
}
|
||||
|
||||
|
@@ -197,9 +197,6 @@ int BotNearbyGoal(bot_state_t *bs, int tfl, bot_goal_t *ltg, float range) {
|
||||
if (BotGoForAir(bs, tfl, ltg, range)) return qtrue;
|
||||
// if the bot is carrying a flag or cubes
|
||||
if (BotCTFCarryingFlag(bs)
|
||||
#ifdef MISSIONPACK
|
||||
|| Bot1FCTFCarryingFlag(bs) || BotHarvesterCarryingCubes(bs)
|
||||
#endif
|
||||
) {
|
||||
//if the bot is just a few secs away from the base
|
||||
if (trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin,
|
||||
@@ -349,7 +346,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
|
||||
BotAI_BotInitialChat(bs, "help_start", EasyClientName(bs->teammate, netname, sizeof(netname)), NULL);
|
||||
trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
|
||||
BotVoiceChatOnly(bs, bs->decisionmaker, VOICECHAT_YES);
|
||||
trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
@@ -394,7 +390,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
|
||||
BotAI_BotInitialChat(bs, "accompany_start", EasyClientName(bs->teammate, netname, sizeof(netname)), NULL);
|
||||
trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
|
||||
BotVoiceChatOnly(bs, bs->decisionmaker, VOICECHAT_YES);
|
||||
trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
@@ -539,7 +534,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
trap_BotGoalName(bs->teamgoal.number, buf, sizeof(buf));
|
||||
BotAI_BotInitialChat(bs, "dd_start_pointa", buf, NULL);
|
||||
trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
|
||||
//BotVoiceChatOnly(bs, -1, VOICECHAT_ONDEFENSE);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
//set the bot goal
|
||||
@@ -565,7 +559,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
trap_BotGoalName(bs->teamgoal.number, buf, sizeof(buf));
|
||||
BotAI_BotInitialChat(bs, "dd_start_pointb", buf, NULL);
|
||||
trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
|
||||
//BotVoiceChatOnly(bs, -1, VOICECHAT_ONDEFENSE);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
//set the bot goal
|
||||
@@ -623,7 +616,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
trap_BotGoalName(bs->teamgoal.number, buf, sizeof(buf));
|
||||
BotAI_BotInitialChat(bs, "defend_start", buf, NULL);
|
||||
trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
|
||||
BotVoiceChatOnly(bs, -1, VOICECHAT_ONDEFENSE);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
//set the bot goal
|
||||
@@ -680,7 +672,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
trap_BotGoalName(bs->teamgoal.number, buf, sizeof(buf));
|
||||
BotAI_BotInitialChat(bs, "getitem_start", buf, NULL);
|
||||
trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
|
||||
BotVoiceChatOnly(bs, bs->decisionmaker, VOICECHAT_YES);
|
||||
trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
@@ -712,7 +703,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
if (bs->ltgtype == LTG_CAMPORDER) {
|
||||
BotAI_BotInitialChat(bs, "camp_start", EasyClientName(bs->teammate, netname, sizeof(netname)), NULL);
|
||||
trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
|
||||
BotVoiceChatOnly(bs, bs->decisionmaker, VOICECHAT_YES);
|
||||
trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
|
||||
}
|
||||
bs->teammessage_time = 0;
|
||||
@@ -736,7 +726,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
if (bs->ltgtype == LTG_CAMPORDER) {
|
||||
BotAI_BotInitialChat(bs, "camp_arrive", EasyClientName(bs->teammate, netname, sizeof(netname)), NULL);
|
||||
trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
|
||||
BotVoiceChatOnly(bs, bs->decisionmaker, VOICECHAT_INPOSITION);
|
||||
}
|
||||
bs->arrive_time = FloatTime();
|
||||
}
|
||||
@@ -794,7 +783,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
}
|
||||
BotAI_BotInitialChat(bs, "patrol_start", buf, NULL);
|
||||
trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
|
||||
BotVoiceChatOnly(bs, bs->decisionmaker, VOICECHAT_YES);
|
||||
trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
@@ -845,7 +833,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
|
||||
BotAI_BotInitialChat(bs, "captureflag_start", NULL);
|
||||
trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
|
||||
BotVoiceChatOnly(bs, -1, VOICECHAT_ONGETFLAG);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
//
|
||||
@@ -903,7 +890,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
|
||||
BotAI_BotInitialChat(bs, "returnflag_start", NULL);
|
||||
trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
|
||||
BotVoiceChatOnly(bs, -1, VOICECHAT_ONRETURNFLAG);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
//
|
||||
@@ -929,7 +915,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
|
||||
BotAI_BotInitialChat(bs, "captureflag_start", NULL);
|
||||
trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
|
||||
BotVoiceChatOnly(bs, -1, VOICECHAT_ONGETFLAG);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
memcpy(goal, &ctf_neutralflag, sizeof(bot_goal_t));
|
||||
@@ -972,7 +957,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
|
||||
BotAI_BotInitialChat(bs, "attackenemybase_start", NULL);
|
||||
trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
|
||||
BotVoiceChatOnly(bs, -1, VOICECHAT_ONOFFENSE);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
switch(BotTeam(bs)) {
|
||||
@@ -996,7 +980,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
|
||||
BotAI_BotInitialChat(bs, "returnflag_start", NULL);
|
||||
trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
|
||||
BotVoiceChatOnly(bs, -1, VOICECHAT_ONRETURNFLAG);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
//
|
||||
@@ -1015,7 +998,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
|
||||
BotAI_BotInitialChat(bs, "attackenemybase_start", NULL);
|
||||
trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
|
||||
BotVoiceChatOnly(bs, -1, VOICECHAT_ONOFFENSE);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
switch(BotTeam(bs)) {
|
||||
@@ -1078,7 +1060,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
|
||||
BotAI_BotInitialChat(bs, "attackenemybase_start", NULL);
|
||||
trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
|
||||
BotVoiceChatOnly(bs, -1, VOICECHAT_ONOFFENSE);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
switch(BotTeam(bs)) {
|
||||
@@ -1103,7 +1084,6 @@ int BotGetLongTermGoal(bot_state_t *bs, int tfl, int retreat, bot_goal_t *goal)
|
||||
if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
|
||||
BotAI_BotInitialChat(bs, "harvest_start", NULL);
|
||||
trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
|
||||
BotVoiceChatOnly(bs, -1, VOICECHAT_ONOFFENSE);
|
||||
bs->teammessage_time = 0;
|
||||
}
|
||||
memcpy(goal, &neutralobelisk, sizeof(bot_goal_t));
|
||||
@@ -2173,12 +2153,6 @@ int AINode_Battle_Fight(bot_state_t *bs) {
|
||||
}
|
||||
//if the enemy is not visible
|
||||
if (!BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, bs->enemy)) {
|
||||
#ifdef MISSIONPACK
|
||||
if (bs->enemy == redobelisk.entitynum || bs->enemy == blueobelisk.entitynum) {
|
||||
AIEnter_Battle_Chase(bs, "battle fight: obelisk out of sight");
|
||||
return qfalse;
|
||||
}
|
||||
#endif
|
||||
if (BotWantsToChase(bs)) {
|
||||
AIEnter_Battle_Chase(bs, "battle fight: enemy out of sight");
|
||||
return qfalse;
|
||||
|
@@ -516,7 +516,6 @@ void BotRefuseOrder(bot_state_t *bs) {
|
||||
// if the bot was ordered to do something
|
||||
if ( bs->order_time && bs->order_time > FloatTime() - 10 ) {
|
||||
trap_EA_Action(bs->client, ACTION_NEGATIVE);
|
||||
BotVoiceChat(bs, bs->decisionmaker, VOICECHAT_NO);
|
||||
bs->order_time = 0;
|
||||
}
|
||||
}
|
||||
@@ -557,7 +556,6 @@ void BotCTFSeekGoals(bot_state_t *bs) {
|
||||
bs->altroutegoal.areanum = 0;
|
||||
}
|
||||
BotSetUserInfo(bs, "teamtask", va("%d", TEAMTASK_OFFENSE));
|
||||
BotVoiceChat(bs, -1, VOICECHAT_IHAVEFLAG);
|
||||
}
|
||||
else if (bs->rushbaseaway_time > FloatTime()) {
|
||||
if (BotTeam(bs) == TEAM_RED) flagstatus = bs->redflagstatus;
|
||||
@@ -606,8 +604,6 @@ void BotCTFSeekGoals(bot_state_t *bs) {
|
||||
bs->teammessage_time = 0;
|
||||
//no arrive message
|
||||
bs->arrive_time = 1;
|
||||
//
|
||||
BotVoiceChat(bs, bs->teammate, VOICECHAT_ONFOLLOW);
|
||||
//get the team goal time
|
||||
bs->teamgoal_time = FloatTime() + TEAM_ACCOMPANY_TIME;
|
||||
bs->ltgtype = LTG_TEAMACCOMPANY;
|
||||
@@ -683,8 +679,6 @@ void BotCTFSeekGoals(bot_state_t *bs) {
|
||||
bs->teammessage_time = 0;
|
||||
//no arrive message
|
||||
bs->arrive_time = 1;
|
||||
//
|
||||
BotVoiceChat(bs, bs->teammate, VOICECHAT_ONFOLLOW);
|
||||
//get the team goal time
|
||||
bs->teamgoal_time = FloatTime() + TEAM_ACCOMPANY_TIME;
|
||||
bs->ltgtype = LTG_TEAMACCOMPANY;
|
||||
@@ -925,7 +919,6 @@ void Bot1FCTFSeekGoals(bot_state_t *bs) {
|
||||
BotGetAlternateRouteGoal(bs, BotOppositeTeam(bs));
|
||||
//
|
||||
BotSetTeamStatus(bs);
|
||||
BotVoiceChat(bs, -1, VOICECHAT_IHAVEFLAG);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -957,8 +950,6 @@ void Bot1FCTFSeekGoals(bot_state_t *bs) {
|
||||
bs->teammessage_time = 0;
|
||||
//no arrive message
|
||||
bs->arrive_time = 1;
|
||||
//
|
||||
BotVoiceChat(bs, bs->teammate, VOICECHAT_ONFOLLOW);
|
||||
//get the team goal time
|
||||
bs->teamgoal_time = FloatTime() + TEAM_ACCOMPANY_TIME;
|
||||
bs->ltgtype = LTG_TEAMACCOMPANY;
|
||||
@@ -1354,8 +1345,6 @@ void BotHarvesterSeekGoals(bot_state_t *bs) {
|
||||
bs->teammessage_time = 0;
|
||||
//no arrive message
|
||||
bs->arrive_time = 1;
|
||||
//
|
||||
BotVoiceChat(bs, bs->teammate, VOICECHAT_ONFOLLOW);
|
||||
//get the team goal time
|
||||
bs->teamgoal_time = FloatTime() + TEAM_ACCOMPANY_TIME;
|
||||
bs->ltgtype = LTG_TEAMACCOMPANY;
|
||||
@@ -1773,7 +1762,6 @@ void BotCheckItemPickup(bot_state_t *bs, int *oldinventory) {
|
||||
// if we have a bot team leader
|
||||
if (BotTeamLeader(bs)) {
|
||||
// tell the leader we want to be on offence
|
||||
BotVoiceChat(bs, leader, VOICECHAT_WANTONOFFENSE);
|
||||
//BotAI_BotInitialChat(bs, "wantoffence", NULL);
|
||||
//trap_BotEnterChat(bs->cs, leader, CHAT_TELL);
|
||||
}
|
||||
@@ -1788,7 +1776,6 @@ void BotCheckItemPickup(bot_state_t *bs, int *oldinventory) {
|
||||
( ( gametype != GT_1FCTF ) ||
|
||||
( bs->neutralflagstatus == 0 ) ) ) {
|
||||
// tell the leader we want to be on offence
|
||||
BotVoiceChat(bs, leader, VOICECHAT_WANTONOFFENSE);
|
||||
//BotAI_BotInitialChat(bs, "wantoffence", NULL);
|
||||
//trap_BotEnterChat(bs->cs, leader, CHAT_TELL);
|
||||
}
|
||||
@@ -1802,7 +1789,6 @@ void BotCheckItemPickup(bot_state_t *bs, int *oldinventory) {
|
||||
// if we have a bot team leader
|
||||
if (BotTeamLeader(bs)) {
|
||||
// tell the leader we want to be on defense
|
||||
BotVoiceChat(bs, -1, VOICECHAT_WANTONDEFENSE);
|
||||
//BotAI_BotInitialChat(bs, "wantdefence", NULL);
|
||||
//trap_BotEnterChat(bs->cs, leader, CHAT_TELL);
|
||||
}
|
||||
@@ -1816,7 +1802,6 @@ void BotCheckItemPickup(bot_state_t *bs, int *oldinventory) {
|
||||
( bs->neutralflagstatus == 0 ) ) ) {
|
||||
|
||||
// tell the leader we want to be on defense
|
||||
BotVoiceChat(bs, -1, VOICECHAT_WANTONDEFENSE);
|
||||
//BotAI_BotInitialChat(bs, "wantdefence", NULL);
|
||||
//trap_BotEnterChat(bs->cs, leader, CHAT_TELL);
|
||||
}
|
||||
@@ -2403,10 +2388,6 @@ int BotWantsToRetreat(bot_state_t *bs) {
|
||||
BotEntityInfo(bs->enemy, &entinfo);
|
||||
// if the enemy is carrying a flag
|
||||
if (EntityCarriesFlag(&entinfo)) return qfalse;
|
||||
#ifdef MISSIONPACK
|
||||
// if the enemy is carrying cubes
|
||||
if (EntityCarriesCubes(&entinfo)) return qfalse;
|
||||
#endif
|
||||
}
|
||||
//if the bot is getting the flag
|
||||
if (bs->ltgtype == LTG_GETFLAG)
|
||||
|
@@ -1040,17 +1040,6 @@ int BotAI(int client, float thinktime) {
|
||||
args[strlen(args)-1] = '\0';
|
||||
trap_BotQueueConsoleMessage(bs->cs, CMS_CHAT, args);
|
||||
}
|
||||
#ifdef MISSIONPACK
|
||||
else if (!Q_stricmp(buf, "vchat")) {
|
||||
BotVoiceChatCommand(bs, SAY_ALL, args);
|
||||
}
|
||||
else if (!Q_stricmp(buf, "vtchat")) {
|
||||
BotVoiceChatCommand(bs, SAY_TEAM, args);
|
||||
}
|
||||
else if (!Q_stricmp(buf, "vtell")) {
|
||||
BotVoiceChatCommand(bs, SAY_TELL, args);
|
||||
}
|
||||
#endif
|
||||
else if (!Q_stricmp(buf, "scores"))
|
||||
{ /*FIXME: parse scores?*/ }
|
||||
else if (!Q_stricmp(buf, "clientLevelShot"))
|
||||
@@ -1670,9 +1659,6 @@ int BotInitLibrary(void) {
|
||||
trap_Cvar_VariableStringBuffer("fs_homepath", buf, sizeof(buf));
|
||||
if (strlen(buf)) trap_BotLibVarSet("homedir", buf);
|
||||
//
|
||||
#ifdef MISSIONPACK
|
||||
trap_BotLibDefine("MISSIONPACK");
|
||||
#endif
|
||||
//setup the bot library
|
||||
return trap_BotLibSetup();
|
||||
}
|
||||
|
@@ -323,59 +323,7 @@ BotSayTeamOrders
|
||||
==================
|
||||
*/
|
||||
void BotSayTeamOrder(bot_state_t *bs, int toclient) {
|
||||
#ifdef MISSIONPACK
|
||||
// voice chats only
|
||||
char buf[MAX_MESSAGE_SIZE];
|
||||
|
||||
trap_BotGetChatMessage(bs->cs, buf, sizeof(buf));
|
||||
#else
|
||||
BotSayTeamOrderAlways(bs, toclient);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
BotVoiceChat
|
||||
==================
|
||||
*/
|
||||
void BotVoiceChat(bot_state_t *bs, int toclient, char *voicechat) {
|
||||
#ifdef MISSIONPACK
|
||||
if (toclient == -1)
|
||||
// voice only say team
|
||||
trap_EA_Command(bs->client, va("vsay_team %s", voicechat));
|
||||
else
|
||||
// voice only tell single player
|
||||
trap_EA_Command(bs->client, va("vtell %d %s", toclient, voicechat));
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
BotVoiceChatOnly
|
||||
==================
|
||||
*/
|
||||
void BotVoiceChatOnly(bot_state_t *bs, int toclient, char *voicechat) {
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
if (toclient == -1)
|
||||
// voice only say team
|
||||
trap_EA_Command(bs->client, va("vosay_team %s", voicechat));
|
||||
else
|
||||
// voice only tell single player
|
||||
trap_EA_Command(bs->client, va("votell %d %s", toclient, voicechat));
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
BotSayVoiceTeamOrder
|
||||
==================
|
||||
*/
|
||||
void BotSayVoiceTeamOrder(bot_state_t *bs, int toclient, char *voicechat) {
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
BotVoiceChat(bs, toclient, voicechat);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -401,7 +349,6 @@ void BotCTFOrders_BothFlagsNotAtBase(bot_state_t *bs) {
|
||||
ClientName(other, name, sizeof(name));
|
||||
if (bot_nochat.integer<3) BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, other);
|
||||
BotSayVoiceTeamOrder(bs, other, VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -414,17 +361,14 @@ void BotCTFOrders_BothFlagsNotAtBase(bot_state_t *bs) {
|
||||
ClientName(bs->flagcarrier, carriername, sizeof(carriername));
|
||||
if (bs->flagcarrier == bs->client) {
|
||||
if (bot_nochat.integer<3)BotAI_BotInitialChat(bs, "cmd_accompanyme", name, NULL);
|
||||
if (bot_nochat.integer<3)BotSayVoiceTeamOrder(bs, other, VOICECHAT_FOLLOWME);
|
||||
}
|
||||
else {
|
||||
if (bot_nochat.integer<3)BotAI_BotInitialChat(bs, "cmd_accompany", name, carriername, NULL);
|
||||
if (bot_nochat.integer<3)BotSayVoiceTeamOrder(bs, other, VOICECHAT_FOLLOWFLAGCARRIER);
|
||||
}
|
||||
}
|
||||
else {
|
||||
//
|
||||
if (bot_nochat.integer<3)BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
if (bot_nochat.integer<3)BotSayVoiceTeamOrder(bs, other, VOICECHAT_GETFLAG);
|
||||
}
|
||||
if (bot_nochat.integer<3)BotSayTeamOrder(bs, other);
|
||||
//tell the one furthest from the the base not carrying the flag to get the enemy flag
|
||||
@@ -433,7 +377,6 @@ void BotCTFOrders_BothFlagsNotAtBase(bot_state_t *bs) {
|
||||
ClientName(other, name, sizeof(name));
|
||||
if (bot_nochat.integer<3)BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
if (bot_nochat.integer<3)BotSayTeamOrder(bs, other);
|
||||
if (bot_nochat.integer<3)BotSayVoiceTeamOrder(bs, other, VOICECHAT_RETURNFLAG);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -453,11 +396,9 @@ void BotCTFOrders_BothFlagsNotAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
if (bs->flagcarrier == bs->client) {
|
||||
if (bot_nochat.integer<3)BotAI_BotInitialChat(bs, "cmd_accompanyme", name, NULL);
|
||||
if (bot_nochat.integer<3)BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_FOLLOWME);
|
||||
}
|
||||
else {
|
||||
if (bot_nochat.integer<3)BotAI_BotInitialChat(bs, "cmd_accompany", name, carriername, NULL);
|
||||
if (bot_nochat.integer<3)BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_FOLLOWFLAGCARRIER);
|
||||
}
|
||||
if (bot_nochat.integer<3)BotSayTeamOrder(bs, teammates[i]);
|
||||
}
|
||||
@@ -471,7 +412,6 @@ void BotCTFOrders_BothFlagsNotAtBase(bot_state_t *bs) {
|
||||
//
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
if (bot_nochat.integer<3)BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
if (bot_nochat.integer<3)BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_GETFLAG);
|
||||
if (bot_nochat.integer<3)BotSayTeamOrder(bs, teammates[i]);
|
||||
}
|
||||
}
|
||||
@@ -484,7 +424,6 @@ void BotCTFOrders_BothFlagsNotAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
if (bot_nochat.integer<3)BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
if (bot_nochat.integer<3)BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
if (bot_nochat.integer<3)BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_RETURNFLAG);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -518,7 +457,6 @@ void BotCTFOrders_FlagNotAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_GETFLAG);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -534,12 +472,10 @@ void BotCTFOrders_FlagNotAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -548,17 +484,14 @@ void BotCTFOrders_FlagNotAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the other two get the flag
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_GETFLAG);
|
||||
//
|
||||
ClientName(teammates[2], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[2]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[2], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -573,14 +506,12 @@ void BotCTFOrders_FlagNotAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
for (i = 0; i < attackers; i++) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_GETFLAG);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -597,12 +528,10 @@ void BotCTFOrders_FlagNotAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_GETFLAG);
|
||||
//
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -611,17 +540,14 @@ void BotCTFOrders_FlagNotAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_GETFLAG);
|
||||
//
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_GETFLAG);
|
||||
//
|
||||
ClientName(teammates[2], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[2]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[2], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -636,14 +562,12 @@ void BotCTFOrders_FlagNotAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
for (i = 0; i < attackers; i++) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_GETFLAG);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -677,7 +601,6 @@ void BotCTFOrders_EnemyFlagNotAtBase(bot_state_t *bs) {
|
||||
ClientName(other, name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, other);
|
||||
BotSayVoiceTeamOrder(bs, other, VOICECHAT_DEFEND);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -688,14 +611,12 @@ void BotCTFOrders_EnemyFlagNotAtBase(bot_state_t *bs) {
|
||||
ClientName(other, name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, other);
|
||||
BotSayVoiceTeamOrder(bs, other, VOICECHAT_DEFEND);
|
||||
//tell the other also to defend the base
|
||||
if (teammates[2] != bs->flagcarrier) other = teammates[2];
|
||||
else other = teammates[1];
|
||||
ClientName(other, name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, other);
|
||||
BotSayVoiceTeamOrder(bs, other, VOICECHAT_DEFEND);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -714,7 +635,6 @@ void BotCTFOrders_EnemyFlagNotAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
// if we have a flag carrier
|
||||
if ( bs->flagcarrier != -1 ) {
|
||||
@@ -728,11 +648,9 @@ void BotCTFOrders_EnemyFlagNotAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
if (bs->flagcarrier == bs->client) {
|
||||
BotAI_BotInitialChat(bs, "cmd_accompanyme", name, NULL);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_FOLLOWME);
|
||||
}
|
||||
else {
|
||||
BotAI_BotInitialChat(bs, "cmd_accompany", name, carriername, NULL);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_FOLLOWFLAGCARRIER);
|
||||
}
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
}
|
||||
@@ -746,7 +664,6 @@ void BotCTFOrders_EnemyFlagNotAtBase(bot_state_t *bs) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_GETFLAG);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
}
|
||||
}
|
||||
@@ -838,7 +755,6 @@ void BotCTFOrders_BothFlagsAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_GETFLAG);
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < numteammates; i++) {
|
||||
@@ -846,7 +762,6 @@ void BotCTFOrders_BothFlagsAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
}
|
||||
return; //Sago: Or the leader will make a counter order.
|
||||
@@ -863,12 +778,10 @@ void BotCTFOrders_BothFlagsAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the other will get the flag
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -877,17 +790,14 @@ void BotCTFOrders_BothFlagsAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the second one closest to the base will defend the base
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_DEFEND);
|
||||
//the other will get the flag
|
||||
ClientName(teammates[2], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[2]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[2], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -901,14 +811,12 @@ void BotCTFOrders_BothFlagsAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
for (i = 0; i < attackers; i++) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_GETFLAG);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -925,12 +833,10 @@ void BotCTFOrders_BothFlagsAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the other will get the flag
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -939,17 +845,14 @@ void BotCTFOrders_BothFlagsAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the others should go for the enemy flag
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_GETFLAG);
|
||||
//
|
||||
ClientName(teammates[2], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[2]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[2], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -963,14 +866,12 @@ void BotCTFOrders_BothFlagsAtBase(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
for (i = 0; i < attackers; i++) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_GETFLAG);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -1131,12 +1032,10 @@ void Bot1FCTFOrders_FlagAtCenter(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the other will get the flag
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -1145,17 +1044,14 @@ void Bot1FCTFOrders_FlagAtCenter(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the second one closest to the base will defend the base
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the other will get the flag
|
||||
ClientName(teammates[2], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[2]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[2], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -1171,14 +1067,12 @@ void Bot1FCTFOrders_FlagAtCenter(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
for (i = 0; i < attackers; i++) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_GETFLAG);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -1195,12 +1089,10 @@ void Bot1FCTFOrders_FlagAtCenter(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the other will get the flag
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -1209,17 +1101,14 @@ void Bot1FCTFOrders_FlagAtCenter(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the others should go for the enemy flag
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_GETFLAG);
|
||||
//
|
||||
ClientName(teammates[2], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[2]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[2], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -1235,14 +1124,12 @@ void Bot1FCTFOrders_FlagAtCenter(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
for (i = 0; i < attackers; i++) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_GETFLAG);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -1282,7 +1169,6 @@ void Bot1FCTFOrders_TeamHasFlag(bot_state_t *bs) {
|
||||
ClientName(other, name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_attackenemybase", name, NULL);
|
||||
BotSayTeamOrder(bs, other);
|
||||
BotSayVoiceTeamOrder(bs, other, VOICECHAT_OFFENSE);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -1293,7 +1179,6 @@ void Bot1FCTFOrders_TeamHasFlag(bot_state_t *bs) {
|
||||
ClientName(other, name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, other);
|
||||
BotSayVoiceTeamOrder(bs, other, VOICECHAT_DEFEND);
|
||||
//tell the one furthest from the base not carrying the flag to accompany the flag carrier
|
||||
if (teammates[2] != bs->flagcarrier) other = teammates[2];
|
||||
else other = teammates[1];
|
||||
@@ -1302,17 +1187,14 @@ void Bot1FCTFOrders_TeamHasFlag(bot_state_t *bs) {
|
||||
ClientName(bs->flagcarrier, carriername, sizeof(carriername));
|
||||
if (bs->flagcarrier == bs->client) {
|
||||
BotAI_BotInitialChat(bs, "cmd_accompanyme", name, NULL);
|
||||
BotSayVoiceTeamOrder(bs, other, VOICECHAT_FOLLOWME);
|
||||
}
|
||||
else {
|
||||
BotAI_BotInitialChat(bs, "cmd_accompany", name, carriername, NULL);
|
||||
BotSayVoiceTeamOrder(bs, other, VOICECHAT_FOLLOWFLAGCARRIER);
|
||||
}
|
||||
}
|
||||
else {
|
||||
//
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayVoiceTeamOrder(bs, other, VOICECHAT_GETFLAG);
|
||||
}
|
||||
BotSayTeamOrder(bs, other);
|
||||
break;
|
||||
@@ -1333,7 +1215,6 @@ void Bot1FCTFOrders_TeamHasFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
if (bs->flagcarrier != -1) {
|
||||
ClientName(bs->flagcarrier, carriername, sizeof(carriername));
|
||||
@@ -1346,11 +1227,9 @@ void Bot1FCTFOrders_TeamHasFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
if (bs->flagcarrier == bs->client) {
|
||||
BotAI_BotInitialChat(bs, "cmd_accompanyme", name, NULL);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_FOLLOWME);
|
||||
}
|
||||
else {
|
||||
BotAI_BotInitialChat(bs, "cmd_accompany", name, carriername, NULL);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_FOLLOWFLAGCARRIER);
|
||||
}
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
}
|
||||
@@ -1365,7 +1244,6 @@ void Bot1FCTFOrders_TeamHasFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_GETFLAG);
|
||||
}
|
||||
}
|
||||
//
|
||||
@@ -1385,7 +1263,6 @@ void Bot1FCTFOrders_TeamHasFlag(bot_state_t *bs) {
|
||||
ClientName(other, name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, other);
|
||||
BotSayVoiceTeamOrder(bs, other, VOICECHAT_DEFEND);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -1396,7 +1273,6 @@ void Bot1FCTFOrders_TeamHasFlag(bot_state_t *bs) {
|
||||
ClientName(other, name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, other);
|
||||
BotSayVoiceTeamOrder(bs, other, VOICECHAT_DEFEND);
|
||||
//tell the one furthest from the base not carrying the flag to accompany the flag carrier
|
||||
if (teammates[2] != bs->flagcarrier) other = teammates[2];
|
||||
else other = teammates[1];
|
||||
@@ -1404,11 +1280,9 @@ void Bot1FCTFOrders_TeamHasFlag(bot_state_t *bs) {
|
||||
ClientName(bs->flagcarrier, carriername, sizeof(carriername));
|
||||
if (bs->flagcarrier == bs->client) {
|
||||
BotAI_BotInitialChat(bs, "cmd_accompanyme", name, NULL);
|
||||
BotSayVoiceTeamOrder(bs, other, VOICECHAT_FOLLOWME);
|
||||
}
|
||||
else {
|
||||
BotAI_BotInitialChat(bs, "cmd_accompany", name, carriername, NULL);
|
||||
BotSayVoiceTeamOrder(bs, other, VOICECHAT_FOLLOWFLAGCARRIER);
|
||||
}
|
||||
BotSayTeamOrder(bs, other);
|
||||
break;
|
||||
@@ -1429,7 +1303,6 @@ void Bot1FCTFOrders_TeamHasFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
ClientName(bs->flagcarrier, carriername, sizeof(carriername));
|
||||
for (i = 0; i < attackers; i++) {
|
||||
@@ -1441,11 +1314,9 @@ void Bot1FCTFOrders_TeamHasFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
if (bs->flagcarrier == bs->client) {
|
||||
BotAI_BotInitialChat(bs, "cmd_accompanyme", name, NULL);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_FOLLOWME);
|
||||
}
|
||||
else {
|
||||
BotAI_BotInitialChat(bs, "cmd_accompany", name, carriername, NULL);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_FOLLOWFLAGCARRIER);
|
||||
}
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
}
|
||||
@@ -1485,12 +1356,10 @@ void Bot1FCTFOrders_EnemyHasFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_DEFEND);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -1499,17 +1368,14 @@ void Bot1FCTFOrders_EnemyHasFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the second one closest to the base will defend the base
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_DEFEND);
|
||||
//the other will also defend the base
|
||||
ClientName(teammates[2], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[2]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[2], VOICECHAT_DEFEND);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -1525,14 +1391,12 @@ void Bot1FCTFOrders_EnemyHasFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
for (i = 0; i < attackers; i++) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_returnflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_GETFLAG);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -1549,12 +1413,10 @@ void Bot1FCTFOrders_EnemyHasFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the other will get the flag
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_DEFEND);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -1563,17 +1425,14 @@ void Bot1FCTFOrders_EnemyHasFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the others should go for the enemy flag
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_DEFEND);
|
||||
//
|
||||
ClientName(teammates[2], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_returnflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[2]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[2], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -1589,14 +1448,12 @@ void Bot1FCTFOrders_EnemyHasFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
for (i = 0; i < attackers; i++) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_returnflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_GETFLAG);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -1634,12 +1491,10 @@ void Bot1FCTFOrders_EnemyDroppedFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the other will get the flag
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -1648,17 +1503,14 @@ void Bot1FCTFOrders_EnemyDroppedFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the second one closest to the base will defend the base
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_DEFEND);
|
||||
//the other will get the flag
|
||||
ClientName(teammates[2], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[2]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[2], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -1674,14 +1526,12 @@ void Bot1FCTFOrders_EnemyDroppedFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
for (i = 0; i < attackers; i++) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_GETFLAG);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -1698,12 +1548,10 @@ void Bot1FCTFOrders_EnemyDroppedFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the other will get the flag
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -1712,17 +1560,14 @@ void Bot1FCTFOrders_EnemyDroppedFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the others should go for the enemy flag
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_GETFLAG);
|
||||
//
|
||||
ClientName(teammates[2], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[2]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[2], VOICECHAT_GETFLAG);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -1738,14 +1583,12 @@ void Bot1FCTFOrders_EnemyDroppedFlag(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
for (i = 0; i < attackers; i++) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_getflag", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_GETFLAG);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -1797,12 +1640,10 @@ void BotObeliskOrders(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the other will attack the enemy base
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_attackenemybase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_OFFENSE);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -1811,17 +1652,14 @@ void BotObeliskOrders(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the one second closest to the base also defends the base
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_DEFEND);
|
||||
//the other one attacks the enemy base
|
||||
ClientName(teammates[2], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_attackenemybase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[2]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[2], VOICECHAT_OFFENSE);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -1837,14 +1675,12 @@ void BotObeliskOrders(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
for (i = 0; i < attackers; i++) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_attackenemybase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_OFFENSE);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -1861,12 +1697,10 @@ void BotObeliskOrders(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the other will attack the enemy base
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_attackenemybase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_OFFENSE);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -1875,17 +1709,14 @@ void BotObeliskOrders(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the others attack the enemy base
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_attackenemybase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_OFFENSE);
|
||||
//
|
||||
ClientName(teammates[2], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_attackenemybase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[2]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[2], VOICECHAT_OFFENSE);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -1901,14 +1732,12 @@ void BotObeliskOrders(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
for (i = 0; i < attackers; i++) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_attackenemybase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_OFFENSE);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -1946,12 +1775,10 @@ void BotHarvesterOrders(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the other will harvest
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_harvest", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_OFFENSE);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -1960,17 +1787,14 @@ void BotHarvesterOrders(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the one second closest to the base also defends the base
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_DEFEND);
|
||||
//the other one goes harvesting
|
||||
ClientName(teammates[2], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_harvest", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[2]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[2], VOICECHAT_OFFENSE);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -1986,14 +1810,12 @@ void BotHarvesterOrders(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
for (i = 0; i < attackers; i++) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_harvest", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_OFFENSE);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -2010,12 +1832,10 @@ void BotHarvesterOrders(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the other will harvest
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_harvest", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_OFFENSE);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
@@ -2024,17 +1844,14 @@ void BotHarvesterOrders(bot_state_t *bs) {
|
||||
ClientName(teammates[0], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[0]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[0], VOICECHAT_DEFEND);
|
||||
//the others go harvesting
|
||||
ClientName(teammates[1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_harvest", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[1], VOICECHAT_OFFENSE);
|
||||
//
|
||||
ClientName(teammates[2], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_harvest", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[2]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[2], VOICECHAT_OFFENSE);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -2050,14 +1867,12 @@ void BotHarvesterOrders(bot_state_t *bs) {
|
||||
ClientName(teammates[i], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_defendbase", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[i]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[i], VOICECHAT_DEFEND);
|
||||
}
|
||||
for (i = 0; i < attackers; i++) {
|
||||
//
|
||||
ClientName(teammates[numteammates - i - 1], name, sizeof(name));
|
||||
BotAI_BotInitialChat(bs, "cmd_harvest", name, NULL);
|
||||
BotSayTeamOrder(bs, teammates[numteammates - i - 1]);
|
||||
BotSayVoiceTeamOrder(bs, teammates[numteammates - i - 1], VOICECHAT_OFFENSE);
|
||||
}
|
||||
//
|
||||
break;
|
||||
@@ -2084,10 +1899,6 @@ int FindHumanTeamLeader(bot_state_t *bs) {
|
||||
if ( BotSameTeam(bs, i) ) {
|
||||
ClientName(i, bs->teamleader, sizeof(bs->teamleader));
|
||||
// if not yet ordered to do anything
|
||||
if ( !BotSetLastOrderedTask(bs) ) {
|
||||
// go on defense by default
|
||||
if (bot_nochat.integer<3)BotVoiceChat_Defend(bs, i, SAY_TELL);
|
||||
}
|
||||
return qtrue;
|
||||
}
|
||||
}
|
||||
@@ -2136,7 +1947,6 @@ void BotTeamAI(bot_state_t *bs) {
|
||||
if (bs->becometeamleader_time && bs->becometeamleader_time < FloatTime()) {
|
||||
BotAI_BotInitialChat(bs, "iamteamleader", NULL);
|
||||
trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
|
||||
BotSayVoiceTeamOrder(bs, -1, VOICECHAT_STARTLEADER);
|
||||
ClientName(bs->client, netname, sizeof(netname));
|
||||
strncpy(bs->teamleader, netname, sizeof(bs->teamleader));
|
||||
bs->teamleader[sizeof(bs->teamleader)-1] = '\0';
|
||||
|
@@ -626,7 +626,7 @@ Only in CTF games
|
||||
*/
|
||||
{
|
||||
"team_CTF_redflag",
|
||||
NULL,
|
||||
"sound/items/holdable.wav",
|
||||
{ "models/flags/r_flag.md3",
|
||||
NULL, NULL, NULL },
|
||||
/* icon */ "icons/iconf_red1",
|
||||
@@ -643,7 +643,7 @@ Only in CTF games
|
||||
*/
|
||||
{
|
||||
"team_CTF_blueflag",
|
||||
NULL,
|
||||
"sound/items/holdable.wav",
|
||||
{ "models/flags/b_flag.md3",
|
||||
NULL, NULL, NULL },
|
||||
/* icon */ "icons/iconf_blu1",
|
||||
@@ -824,7 +824,7 @@ Only in One Flag CTF games
|
||||
*/
|
||||
{
|
||||
"team_CTF_neutralflag",
|
||||
NULL,
|
||||
"sound/items/holdable.wav",
|
||||
{ "models/flags/n_flag.md3",
|
||||
NULL, NULL, NULL },
|
||||
/* icon */ "icons/iconf_neutral1",
|
||||
|
@@ -1038,20 +1038,6 @@ void ClientThink_real( gentity_t *ent ) {
|
||||
|
||||
VectorCopy( client->ps.origin, client->oldOrigin );
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
if (level.intermissionQueued != 0 && g_singlePlayer.integer) {
|
||||
if ( level.time - level.intermissionQueued >= 1000 ) {
|
||||
pm.cmd.buttons = 0;
|
||||
pm.cmd.forwardmove = 0;
|
||||
pm.cmd.rightmove = 0;
|
||||
pm.cmd.upmove = 0;
|
||||
if ( level.time - level.intermissionQueued >= 2000 && level.time - level.intermissionQueued <= 2500 ) {
|
||||
trap_SendConsoleCommand( EXEC_APPEND, "centerview\n");
|
||||
}
|
||||
ent->client->ps.pm_type = PM_SPINTERMISSION;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Pmove (&pm);
|
||||
|
||||
// save results of pmove
|
||||
|
@@ -142,14 +142,14 @@ typedef struct g_admin_namelog
|
||||
}
|
||||
g_admin_namelog_t;
|
||||
//KK-OAX Added for Warnings
|
||||
typedef struct g_admin_warning {
|
||||
char name[ MAX_NAME_LENGTH ];
|
||||
char guid[ 33 ];
|
||||
char ip[ 40 ];
|
||||
char warning[MAX_STRING_CHARS];
|
||||
char made[ 18 ];
|
||||
char warner[MAX_NAME_LENGTH];
|
||||
int expires;
|
||||
typedef struct g_admin_warning {
|
||||
char name[ MAX_NAME_LENGTH ];
|
||||
char guid[ 33 ];
|
||||
char ip[ 40 ];
|
||||
char warning[MAX_STRING_CHARS];
|
||||
char made[ 18 ];
|
||||
char warner[MAX_NAME_LENGTH];
|
||||
int expires;
|
||||
} g_admin_warning_t;
|
||||
|
||||
qboolean G_admin_ban_check( char *userinfo, char *reason, int rlen );
|
||||
|
@@ -42,10 +42,8 @@ void UpdateTournamentInfo( void ) {
|
||||
gentity_t *player;
|
||||
int playerClientNum;
|
||||
int n, accuracy, perfect, msglen;
|
||||
#ifdef MISSIONPACK // bk001205
|
||||
int score1, score2;
|
||||
int score1, score2;
|
||||
qboolean won;
|
||||
#endif
|
||||
char buf[32];
|
||||
char msg[MAX_STRING_CHARS];
|
||||
|
||||
@@ -69,11 +67,7 @@ void UpdateTournamentInfo( void ) {
|
||||
CalculateRanks();
|
||||
|
||||
if ( level.clients[playerClientNum].sess.sessionTeam == TEAM_SPECTATOR ) {
|
||||
#ifdef MISSIONPACK
|
||||
Com_sprintf( msg, sizeof(msg), "postgame %i %i 0 0 0 0 0 0 0 0 0 0 0", level.numNonSpectatorClients, playerClientNum );
|
||||
#else
|
||||
Com_sprintf( msg, sizeof(msg), "postgame %i %i 0 0 0 0 0 0", level.numNonSpectatorClients, playerClientNum );
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
if( player->client->accuracy_shots ) {
|
||||
@@ -82,43 +76,11 @@ void UpdateTournamentInfo( void ) {
|
||||
else {
|
||||
accuracy = 0;
|
||||
}
|
||||
#ifdef MISSIONPACK
|
||||
won = qfalse;
|
||||
if (g_gametype.integer >= GT_CTF && g_ffa_gt==0) {
|
||||
score1 = level.teamScores[TEAM_RED];
|
||||
score2 = level.teamScores[TEAM_BLUE];
|
||||
if (level.clients[playerClientNum].sess.sessionTeam == TEAM_RED) {
|
||||
won = (level.teamScores[TEAM_RED] > level.teamScores[TEAM_BLUE]);
|
||||
} else {
|
||||
won = (level.teamScores[TEAM_BLUE] > level.teamScores[TEAM_RED]);
|
||||
}
|
||||
} else {
|
||||
if (&level.clients[playerClientNum] == &level.clients[ level.sortedClients[0] ]) {
|
||||
won = qtrue;
|
||||
score1 = level.clients[ level.sortedClients[0] ].ps.persistant[PERS_SCORE];
|
||||
score2 = level.clients[ level.sortedClients[1] ].ps.persistant[PERS_SCORE];
|
||||
} else {
|
||||
score2 = level.clients[ level.sortedClients[0] ].ps.persistant[PERS_SCORE];
|
||||
score1 = level.clients[ level.sortedClients[1] ].ps.persistant[PERS_SCORE];
|
||||
}
|
||||
}
|
||||
if (won && player->client->ps.persistant[PERS_KILLED] == 0) {
|
||||
perfect = 1;
|
||||
} else {
|
||||
perfect = 0;
|
||||
}
|
||||
Com_sprintf( msg, sizeof(msg), "postgame %i %i %i %i %i %i %i %i %i %i %i %i %i %i", level.numNonSpectatorClients, playerClientNum, accuracy,
|
||||
player->client->ps.persistant[PERS_IMPRESSIVE_COUNT], player->client->ps.persistant[PERS_EXCELLENT_COUNT],player->client->ps.persistant[PERS_DEFEND_COUNT],
|
||||
player->client->ps.persistant[PERS_ASSIST_COUNT], player->client->ps.persistant[PERS_GAUNTLET_FRAG_COUNT], player->client->ps.persistant[PERS_SCORE],
|
||||
perfect, score1, score2, level.time, player->client->ps.persistant[PERS_CAPTURES] );
|
||||
|
||||
#else
|
||||
perfect = ( level.clients[playerClientNum].ps.persistant[PERS_RANK] == 0 && player->client->ps.persistant[PERS_KILLED] == 0 ) ? 1 : 0;
|
||||
Com_sprintf( msg, sizeof(msg), "postgame %i %i %i %i %i %i %i %i", level.numNonSpectatorClients, playerClientNum, accuracy,
|
||||
player->client->ps.persistant[PERS_IMPRESSIVE_COUNT], player->client->ps.persistant[PERS_EXCELLENT_COUNT],
|
||||
player->client->ps.persistant[PERS_GAUNTLET_FRAG_COUNT], player->client->ps.persistant[PERS_SCORE],
|
||||
perfect );
|
||||
#endif
|
||||
}
|
||||
|
||||
msglen = strlen( msg );
|
||||
|
@@ -1294,15 +1294,15 @@ static void G_VoiceTo( gentity_t *ent, gentity_t *other, int mode, const char *i
|
||||
|
||||
if (mode == SAY_TEAM) {
|
||||
color = COLOR_CYAN;
|
||||
cmd = "vtchat";
|
||||
cmd = "tchat";
|
||||
}
|
||||
else if (mode == SAY_TELL) {
|
||||
color = COLOR_MAGENTA;
|
||||
cmd = "vtell";
|
||||
cmd = "tell";
|
||||
}
|
||||
else {
|
||||
color = COLOR_GREEN;
|
||||
cmd = "vchat";
|
||||
cmd = "chat";
|
||||
}
|
||||
|
||||
trap_SendServerCommand( other-g_entities, va("%s %d %d %d %s", cmd, voiceonly, ent->s.number, color, id));
|
||||
@@ -1410,7 +1410,7 @@ static void Cmd_VoiceTell_f( gentity_t *ent ) {
|
||||
|
||||
id = ConcatArgs( 2 );
|
||||
|
||||
G_LogPrintf( "vtell: %s to %s: %s\n", ent->client->pers.netname, target->client->pers.netname, id );
|
||||
G_LogPrintf( "tell: %s to %s: %s\n", ent->client->pers.netname, target->client->pers.netname, id );
|
||||
G_Voice( ent, target, SAY_TELL, id, voiceonly );
|
||||
// don't tell to the player self if it was already directed to this player
|
||||
// also don't send the chat back to a bot
|
||||
@@ -2175,15 +2175,6 @@ commands_t cmds[ ] =
|
||||
// can be used even during intermission
|
||||
{ "say", CMD_MESSAGE|CMD_INTERMISSION, Cmd_Say_f },
|
||||
{ "say_team", CMD_MESSAGE|CMD_INTERMISSION, Cmd_Say_f },
|
||||
{ "vsay", CMD_MESSAGE|CMD_INTERMISSION, Cmd_Voice_f },
|
||||
{ "vsay_team", CMD_MESSAGE|CMD_INTERMISSION, Cmd_Voice_f },
|
||||
{ "vsay_local", CMD_MESSAGE|CMD_INTERMISSION, Cmd_Voice_f },
|
||||
{ "vtell", CMD_MESSAGE|CMD_INTERMISSION, Cmd_VoiceTell_f },
|
||||
{ "vosay", CMD_MESSAGE|CMD_INTERMISSION, Cmd_Voice_f },
|
||||
{ "vosay_team", CMD_MESSAGE|CMD_INTERMISSION, Cmd_Voice_f },
|
||||
{ "vosay_local", CMD_MESSAGE|CMD_INTERMISSION, Cmd_Voice_f },
|
||||
{ "votell", CMD_MESSAGE|CMD_INTERMISSION, Cmd_VoiceTell_f },
|
||||
{ "vtaunt", CMD_MESSAGE|CMD_INTERMISSION, Cmd_VoiceTaunt_f },
|
||||
/*{ "m", CMD_MESSAGE|CMD_INTERMISSION, Cmd_PrivateMessage_f },
|
||||
{ "mt", CMD_MESSAGE|CMD_INTERMISSION, Cmd_PrivateMessage_f },
|
||||
{ "a", CMD_MESSAGE|CMD_INTERMISSION, Cmd_AdminMessage_f },*/
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,36 +1,36 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2009 Karl Kuglin
|
||||
Copyright (C) 2004-2006 Tony J. White
|
||||
|
||||
This file is part of the Open Arena source code.
|
||||
Portions copied/modified from Tremulous under GPL version 2 including any
|
||||
later versions.
|
||||
|
||||
Open Arena source code is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
Open Arena source code is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Open Arena source code; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2009 Karl Kuglin
|
||||
Copyright (C) 2004-2006 Tony J. White
|
||||
|
||||
This file is part of the Open Arena source code.
|
||||
Portions copied/modified from Tremulous under GPL version 2 including any
|
||||
later versions.
|
||||
|
||||
Open Arena source code is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
Open Arena source code is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Open Arena source code; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "g_local.h"
|
||||
|
||||
/*
|
||||
================
|
||||
readFile_int
|
||||
This parses an integer for the "tag" specified (cnf)
|
||||
================
|
||||
*/
|
||||
|
||||
/*
|
||||
================
|
||||
readFile_int
|
||||
This parses an integer for the "tag" specified (cnf)
|
||||
================
|
||||
*/
|
||||
void readFile_int( char **cnf, int *v )
|
||||
{
|
||||
char *t;
|
||||
|
@@ -1,70 +1,70 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2009 Karl Kuglin
|
||||
|
||||
This file is part of the Open Arena source code.
|
||||
|
||||
Open Arena source code is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
Open Arena source code is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Open Arena source code; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
//definitions
|
||||
// I'd say 32 sprees is a lot!!!
|
||||
#define MAX_KSPREE 32
|
||||
#define MAX_DSPREE 32
|
||||
#define MAX_MULTIKILLS 32
|
||||
|
||||
#define CENTER_PRINT 1
|
||||
#define CHAT 2
|
||||
|
||||
//Used to pass parameter to calculate the upper-most level of
|
||||
// the spree/multikill arrays.
|
||||
#define LARGEST_KILLSPREE 1
|
||||
#define LARGEST_DEATHSPREE 2
|
||||
#define LARGEST_MULTIKILL 3
|
||||
|
||||
typedef struct killspree
|
||||
{
|
||||
int spreeLevel;
|
||||
int streakCount; //Added programatically based off SpreeDivisor.
|
||||
char spreeMsg[ MAX_STRING_CHARS ];
|
||||
char sound2Play[ MAX_STRING_CHARS ];
|
||||
int position;
|
||||
} killspree_t;
|
||||
|
||||
|
||||
typedef struct deathspree
|
||||
{
|
||||
int spreeLevel;
|
||||
int streakCount; //Added programatically based off SpreeDivisor.
|
||||
char spreeMsg[ MAX_STRING_CHARS ];
|
||||
char sound2Play[ MAX_STRING_CHARS ];
|
||||
int position;
|
||||
} deathspree_t;
|
||||
|
||||
typedef struct multikill
|
||||
{
|
||||
char killMsg[ MAX_STRING_CHARS ];
|
||||
char sound2Play[ MAX_STRING_CHARS ];
|
||||
int kills;
|
||||
} multikill_t;
|
||||
|
||||
//function declarations
|
||||
qboolean G_ReadAltKillSettings( gentity_t *ent, int skiparg );
|
||||
void G_RunStreakLogic( gentity_t *attacker, gentity_t *victim );
|
||||
void G_CheckForSpree( gentity_t *ent, int streak2Test, qboolean checkKillSpree );
|
||||
void G_checkForMultiKill( gentity_t *ent );
|
||||
void G_ConfigClientExcellent( qboolean levelStart );
|
||||
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2009 Karl Kuglin
|
||||
|
||||
This file is part of the Open Arena source code.
|
||||
|
||||
Open Arena source code is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
Open Arena source code is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Open Arena source code; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
//definitions
|
||||
// I'd say 32 sprees is a lot!!!
|
||||
#define MAX_KSPREE 32
|
||||
#define MAX_DSPREE 32
|
||||
#define MAX_MULTIKILLS 32
|
||||
|
||||
#define CENTER_PRINT 1
|
||||
#define CHAT 2
|
||||
|
||||
//Used to pass parameter to calculate the upper-most level of
|
||||
// the spree/multikill arrays.
|
||||
#define LARGEST_KILLSPREE 1
|
||||
#define LARGEST_DEATHSPREE 2
|
||||
#define LARGEST_MULTIKILL 3
|
||||
|
||||
typedef struct killspree
|
||||
{
|
||||
int spreeLevel;
|
||||
int streakCount; //Added programatically based off SpreeDivisor.
|
||||
char spreeMsg[ MAX_STRING_CHARS ];
|
||||
char sound2Play[ MAX_STRING_CHARS ];
|
||||
int position;
|
||||
} killspree_t;
|
||||
|
||||
|
||||
typedef struct deathspree
|
||||
{
|
||||
int spreeLevel;
|
||||
int streakCount; //Added programatically based off SpreeDivisor.
|
||||
char spreeMsg[ MAX_STRING_CHARS ];
|
||||
char sound2Play[ MAX_STRING_CHARS ];
|
||||
int position;
|
||||
} deathspree_t;
|
||||
|
||||
typedef struct multikill
|
||||
{
|
||||
char killMsg[ MAX_STRING_CHARS ];
|
||||
char sound2Play[ MAX_STRING_CHARS ];
|
||||
int kills;
|
||||
} multikill_t;
|
||||
|
||||
//function declarations
|
||||
qboolean G_ReadAltKillSettings( gentity_t *ent, int skiparg );
|
||||
void G_RunStreakLogic( gentity_t *attacker, gentity_t *victim );
|
||||
void G_CheckForSpree( gentity_t *ent, int streak2Test, qboolean checkKillSpree );
|
||||
void G_checkForMultiKill( gentity_t *ent );
|
||||
void G_ConfigClientExcellent( qboolean levelStart );
|
||||
|
||||
|
@@ -1039,11 +1039,6 @@ extern vmCvar_t pmove_fixed;
|
||||
extern vmCvar_t pmove_msec;
|
||||
extern vmCvar_t pmove_float;
|
||||
extern vmCvar_t g_rankings;
|
||||
#ifdef MISSIONPACK
|
||||
extern vmCvar_t g_singlePlayer;
|
||||
extern vmCvar_t g_redteam;
|
||||
extern vmCvar_t g_blueteam;
|
||||
#endif
|
||||
extern vmCvar_t g_enableDust;
|
||||
extern vmCvar_t g_enableBreath;
|
||||
extern vmCvar_t g_proxMineTimeout;
|
||||
|
@@ -96,11 +96,6 @@ vmCvar_t g_obeliskRegenPeriod;
|
||||
vmCvar_t g_obeliskRegenAmount;
|
||||
vmCvar_t g_obeliskRespawnDelay;
|
||||
vmCvar_t g_cubeTimeout;
|
||||
#ifdef MISSIONPACK
|
||||
vmCvar_t g_redteam;
|
||||
vmCvar_t g_blueteam;
|
||||
vmCvar_t g_singlePlayer;
|
||||
#endif
|
||||
vmCvar_t g_enableDust;
|
||||
vmCvar_t g_enableBreath;
|
||||
vmCvar_t g_proxMineTimeout;
|
||||
@@ -286,11 +281,6 @@ static cvarTable_t gameCvarTable[] = {
|
||||
{ &g_obeliskRespawnDelay, "g_obeliskRespawnDelay", "10", CVAR_SERVERINFO, 0, qfalse },
|
||||
|
||||
{ &g_cubeTimeout, "g_cubeTimeout", "30", 0, 0, qfalse },
|
||||
#ifdef MISSIONPACK
|
||||
{ &g_redteam, "g_redteam", "Stroggs", CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO , 0, qtrue, qtrue },
|
||||
{ &g_blueteam, "g_blueteam", "Pagans", CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO , 0, qtrue, qtrue },
|
||||
{ &g_singlePlayer, "ui_singlePlayerActive", "", 0, 0, qfalse, qfalse },
|
||||
#endif
|
||||
|
||||
{ &g_enableDust, "g_enableDust", "0", CVAR_SERVERINFO, 0, qtrue, qfalse },
|
||||
{ &g_enableBreath, "g_enableBreath", "0", CVAR_SERVERINFO, 0, qtrue, qfalse },
|
||||
@@ -342,12 +332,7 @@ static cvarTable_t gameCvarTable[] = {
|
||||
{ &g_awardpushing, "g_awardpushing", "1", CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue },
|
||||
|
||||
//g_persistantpowerups
|
||||
#ifdef MISSIONPACK
|
||||
{ &g_persistantpowerups, "g_runes", "1", CVAR_LATCH, 0, qfalse },
|
||||
#else
|
||||
{ &g_persistantpowerups, "g_runes", "0", CVAR_LATCH|CVAR_ARCHIVE, 0, qfalse },
|
||||
#endif
|
||||
|
||||
|
||||
//nexuiz style rocket arena
|
||||
{ &g_rockets, "g_rockets", "0", CVAR_SERVERINFO | CVAR_LATCH | CVAR_NORESTART, 0, qfalse },
|
||||
@@ -533,19 +518,6 @@ void G_FindTeams( void ) {
|
||||
G_Printf ("%i teams with %i entities\n", c, c2);
|
||||
}
|
||||
|
||||
void G_RemapTeamShaders( void ) {
|
||||
#ifdef MISSIONPACK
|
||||
char string[1024];
|
||||
float f = level.time * 0.001;
|
||||
Com_sprintf( string, sizeof(string), "team_icon/%s_red", g_redteam.string );
|
||||
AddRemap("textures/ctf2/redteam01", string, f);
|
||||
AddRemap("textures/ctf2/redteam02", string, f);
|
||||
Com_sprintf( string, sizeof(string), "team_icon/%s_blue", g_blueteam.string );
|
||||
AddRemap("textures/ctf2/blueteam01", string, f);
|
||||
AddRemap("textures/ctf2/blueteam02", string, f);
|
||||
trap_SetConfigstring(CS_SHADERSTATE, BuildShaderStateConfig());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -569,10 +541,6 @@ void G_RegisterCvars( void ) {
|
||||
}
|
||||
}
|
||||
|
||||
if (remapped) {
|
||||
G_RemapTeamShaders();
|
||||
}
|
||||
|
||||
// check some things
|
||||
if ( g_gametype.integer < 0 || g_gametype.integer >= GT_MAX_GAME_TYPE ) {
|
||||
G_Printf( "g_gametype %i is out of range, defaulting to 0\n", g_gametype.integer );
|
||||
@@ -662,11 +630,7 @@ void G_UpdateCvars( void ) {
|
||||
}
|
||||
}
|
||||
|
||||
if (remapped) {
|
||||
G_RemapTeamShaders();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Sets the cvar g_timestamp. Return 0 if success or !0 for errors.
|
||||
*/
|
||||
@@ -810,8 +774,6 @@ void G_InitGame( int levelTime, int randomSeed, int restart ) {
|
||||
G_InitBots( restart );
|
||||
}
|
||||
|
||||
G_RemapTeamShaders();
|
||||
|
||||
//elimination:
|
||||
level.roundNumber = 1;
|
||||
level.roundNumberStarted = 0;
|
||||
@@ -1477,18 +1439,11 @@ void BeginIntermission( void ) {
|
||||
}
|
||||
MoveClientToIntermission( client );
|
||||
}
|
||||
#ifdef MISSIONPACK
|
||||
if (g_singlePlayer.integer) {
|
||||
trap_Cvar_Set("ui_singlePlayerActive", "0");
|
||||
UpdateTournamentInfo();
|
||||
}
|
||||
#else
|
||||
// if single player game
|
||||
if ( g_gametype.integer == GT_SINGLE_PLAYER ) {
|
||||
UpdateTournamentInfo();
|
||||
SpawnModelsOnVictoryPads();
|
||||
}
|
||||
#endif
|
||||
// send the current scoring to all clients
|
||||
SendScoreboardMessageToAllClients();
|
||||
|
||||
@@ -1661,9 +1616,6 @@ Append information about this game to the log file
|
||||
void LogExit( const char *string ) {
|
||||
int i, numSorted;
|
||||
gclient_t *cl;
|
||||
#ifdef MISSIONPACK
|
||||
qboolean won = qtrue;
|
||||
#endif
|
||||
G_LogPrintf( "Exit: %s\n", string );
|
||||
|
||||
level.intermissionQueued = level.time;
|
||||
@@ -1698,26 +1650,7 @@ void LogExit( const char *string ) {
|
||||
ping = cl->ps.ping < 999 ? cl->ps.ping : 999;
|
||||
|
||||
G_LogPrintf( "score: %i ping: %i client: %i %s\n", cl->ps.persistant[PERS_SCORE], ping, level.sortedClients[i], cl->pers.netname );
|
||||
#ifdef MISSIONPACK
|
||||
if (g_singlePlayer.integer && g_gametype.integer == GT_TOURNAMENT) {
|
||||
if (g_entities[cl - level.clients].r.svFlags & SVF_BOT && cl->ps.persistant[PERS_RANK] == 0) {
|
||||
won = qfalse;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
if (g_singlePlayer.integer) {
|
||||
if (g_gametype.integer >= GT_CTF && g_ffa_gt==0) {
|
||||
won = level.teamScores[TEAM_RED] > level.teamScores[TEAM_BLUE];
|
||||
}
|
||||
trap_SendConsoleCommand( EXEC_APPEND, (won) ? "spWin\n" : "spLose\n" );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1870,18 +1803,10 @@ void CheckExitRules( void ) {
|
||||
}
|
||||
|
||||
if ( level.intermissionQueued ) {
|
||||
#ifdef MISSIONPACK
|
||||
int time = (g_singlePlayer.integer) ? SP_INTERMISSION_DELAY_TIME : INTERMISSION_DELAY_TIME;
|
||||
if ( level.time - level.intermissionQueued >= time ) {
|
||||
level.intermissionQueued = 0;
|
||||
BeginIntermission();
|
||||
}
|
||||
#else
|
||||
if ( level.time - level.intermissionQueued >= INTERMISSION_DELAY_TIME ) {
|
||||
level.intermissionQueued = 0;
|
||||
BeginIntermission();
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -467,19 +467,11 @@ void G_SpawnGEntityFromSpawnVars( void ) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
G_SpawnInt( "notta", "0", &i );
|
||||
if ( i ) {
|
||||
G_FreeEntity( ent );
|
||||
return;
|
||||
}
|
||||
#else
|
||||
G_SpawnInt( "notq3a", "0", &i );
|
||||
if ( i ) {
|
||||
G_FreeEntity( ent );
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if( G_SpawnString( "!gametype", NULL, &value ) ) {
|
||||
if( g_gametype.integer >= GT_FFA && g_gametype.integer < GT_MAX_GAME_TYPE ) {
|
||||
|
@@ -1,29 +1,29 @@
|
||||
//KK-OAX
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 1999-2005 Id Software, Inc.
|
||||
|
||||
This file is part of the Open Arena source code.
|
||||
Copied from Tremulous under GPL version 2 including any later version.
|
||||
|
||||
Open Arena source code is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
Open Arena source code is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Open Arena source code; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
//KK-OAX
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 1999-2005 Id Software, Inc.
|
||||
|
||||
This file is part of the Open Arena source code.
|
||||
Copied from Tremulous under GPL version 2 including any later version.
|
||||
|
||||
Open Arena source code is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
Open Arena source code is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Open Arena source code; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "g_local.h"
|
||||
|
||||
|
||||
/*
|
||||
============
|
||||
Svcmd_status_f
|
||||
|
@@ -21,23 +21,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
//
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
|
||||
#define CTF_CAPTURE_BONUS 100 // what you get for capture
|
||||
#define CTF_TEAM_BONUS 25 // what your team gets for capture
|
||||
#define CTF_RECOVERY_BONUS 10 // what you get for recovery
|
||||
#define CTF_FLAG_BONUS 10 // what you get for picking up enemy flag
|
||||
#define CTF_FRAG_CARRIER_BONUS 20 // what you get for fragging enemy flag carrier
|
||||
#define CTF_FLAG_RETURN_TIME 40000 // seconds until auto return
|
||||
|
||||
#define CTF_CARRIER_DANGER_PROTECT_BONUS 5 // bonus for fraggin someone who has recently hurt your flag carrier
|
||||
#define CTF_CARRIER_PROTECT_BONUS 2 // bonus for fraggin someone while either you or your target are near your flag carrier
|
||||
#define CTF_FLAG_DEFENSE_BONUS 10 // bonus for fraggin someone while either you or your target are near your flag
|
||||
#define CTF_RETURN_FLAG_ASSIST_BONUS 10 // awarded for returning a flag that causes a capture to happen almost immediately
|
||||
#define CTF_FRAG_CARRIER_ASSIST_BONUS 10 // award for fragging a flag carrier if a capture happens almost immediately
|
||||
|
||||
#else
|
||||
|
||||
#define CTF_CAPTURE_BONUS 5 // what you get for capture
|
||||
#define CTF_TEAM_BONUS 0 // what your team gets for capture
|
||||
#define CTF_RECOVERY_BONUS 1 // what you get for recovery
|
||||
@@ -51,21 +34,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#define CTF_RETURN_FLAG_ASSIST_BONUS 1 // awarded for returning a flag that causes a capture to happen almost immediately
|
||||
#define CTF_FRAG_CARRIER_ASSIST_BONUS 2 // award for fragging a flag carrier if a capture happens almost immediately
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
|
||||
//For Double Domination:
|
||||
#define DD_POINT_DEFENCE_BONUS 10 //Score for fragging someone while either you or target are near a Domination Point
|
||||
#define DD_POINT_DEFENCE_CLOSE_BONUS 25 //Score for fragging someone while either you or target are near a Domination Point and have almost scored
|
||||
//Following is added togehter:
|
||||
#define DD_POINT_CAPTURE 5 //Score for taking a point
|
||||
#define DD_POINT_CAPTURE_BREAK 10 //If the enemy was dominating
|
||||
#define DD_POINT_CAPTURE_CLOSE 15 //Extra score if the enemy was about to score
|
||||
#define DD_AT_POINT_AT_CAPTURE 30 //You was close to a point as capture succeded.
|
||||
|
||||
#else
|
||||
|
||||
//For Double Domination:
|
||||
#define DD_POINT_DEFENCE_BONUS 1 //Score for fragging someone while either you or target are near a Domination Point
|
||||
#define DD_POINT_DEFENCE_CLOSE_BONUS 2 //Score for fragging someone while either you or target are near a Domination Point and have almost scored
|
||||
@@ -75,8 +43,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#define DD_POINT_CAPTURE_CLOSE 1 //Extra score if the enemy was about to score
|
||||
#define DD_AT_POINT_AT_CAPTURE 1 //You was close to a point as capture succeded.
|
||||
|
||||
#endif
|
||||
|
||||
#define DD_CLOSE 3 //How many seconds to score is close
|
||||
|
||||
#define CTF_TARGET_PROTECT_RADIUS 1000 // the radius around an object being defended where a target will be worth extra frags
|
||||
|
@@ -83,13 +83,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#define NUM_VISIBLE_ENEMIES 202
|
||||
#define NUM_VISIBLE_TEAMMATES 203
|
||||
|
||||
// if running the mission pack
|
||||
#ifdef MISSIONPACK
|
||||
|
||||
//#error "running mission pack"
|
||||
|
||||
#endif
|
||||
|
||||
//item numbers (make sure they are in sync with bg_itemlist in bg_misc.c)
|
||||
#define MODELINDEX_ARMORSHARD 1
|
||||
#define MODELINDEX_ARMORCOMBAT 2
|
||||
|
@@ -236,11 +236,11 @@ UI_AddBotsMenu_Init
|
||||
=================
|
||||
*/
|
||||
static const char *skillNames[] = {
|
||||
"I Can Win",
|
||||
"Bring It On",
|
||||
"Hurt Me Plenty",
|
||||
"Hardcore",
|
||||
"Nightmare!",
|
||||
"Easy",
|
||||
"Normal",
|
||||
"Hard",
|
||||
"Insane",
|
||||
"Lunatic!",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@@ -287,9 +287,9 @@ static bind_t g_bindings[] =
|
||||
{"weapon 7", "railgun", ID_WEAPON7, ANIM_WEAPON7, '7', -1, -1, -1},
|
||||
{"weapon 8", "plasma gun", ID_WEAPON8, ANIM_WEAPON8, '8', -1, -1, -1},
|
||||
{"weapon 9", "BFG", ID_WEAPON9, ANIM_WEAPON9, '9', -1, -1, -1},
|
||||
{"weapon 10", "Grapple", ID_WEAPON10, ANIM_WEAPON10, -1, -1, -1, -1},
|
||||
{"weapon 10", "grapple", ID_WEAPON10, ANIM_WEAPON10, -1, -1, -1, -1},
|
||||
{"weapon 11", "nailgun", ID_WEAPON11, ANIM_WEAPON11, -1, -1, -1, -1},
|
||||
{"weapon 12", "mine Launcher", ID_WEAPON12, ANIM_WEAPON12, -1, -1, -1, -1},
|
||||
{"weapon 12", "mine launcher", ID_WEAPON12, ANIM_WEAPON12, -1, -1, -1, -1},
|
||||
{"weapon 13", "chaingun", ID_WEAPON13, ANIM_WEAPON13, -1, -1, -1, -1},
|
||||
{"+attack", "attack", ID_ATTACK, ANIM_ATTACK, K_CTRL, -1, -1, -1},
|
||||
{"weapprev", "prev weapon", ID_WEAPPREV, ANIM_IDLE, '[', -1, -1, -1},
|
||||
|
@@ -38,10 +38,36 @@ CREDITS
|
||||
|
||||
typedef struct {
|
||||
menuframework_s menu;
|
||||
int frame;
|
||||
} creditsmenu_t;
|
||||
|
||||
static creditsmenu_t s_credits;
|
||||
|
||||
/*
|
||||
=================
|
||||
UI_CreditMenu_Draw_IA
|
||||
=================
|
||||
*/
|
||||
static void UI_CreditMenu_Draw_IA( void ) {
|
||||
int y;
|
||||
int i;
|
||||
|
||||
static const char *names[] = {
|
||||
"Izuru Yakumo",
|
||||
"Nishi",
|
||||
NULL
|
||||
};
|
||||
|
||||
y = (SCREEN_HEIGHT - ARRAY_LEN(names) * (1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE)) / 2;
|
||||
|
||||
UI_DrawProportionalString( 320, y, "Illusion Arena developers:", UI_CENTER|UI_SMALLFONT, color_white );
|
||||
y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
|
||||
|
||||
for (i = 0; names[i]; i++) {
|
||||
UI_DrawProportionalString( 320, y, names[i], UI_CENTER|UI_SMALLFONT, color_white );
|
||||
y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
@@ -49,36 +75,20 @@ UI_CreditMenu_Key
|
||||
=================
|
||||
*/
|
||||
static sfxHandle_t UI_CreditMenu_Key( int key ) {
|
||||
if( key & K_CHAR_FLAG ) {
|
||||
return 0;
|
||||
if( key & K_CHAR_FLAG ) {
|
||||
return 0;
|
||||
}
|
||||
s_credits.frame++;
|
||||
|
||||
if (s_credits.frame == 1) {
|
||||
s_credits.menu.draw = UI_CreditMenu_Draw_IA;
|
||||
} else {
|
||||
trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" );
|
||||
}
|
||||
|
||||
//Sago: I no longer show credits on close. Consider something else if ingame credits are to be made
|
||||
//trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
===============
|
||||
UI_CreditMenu_Draw
|
||||
===============
|
||||
*/
|
||||
static void UI_CreditMenu_Draw( void ) {
|
||||
int y;
|
||||
|
||||
y = 12;
|
||||
UI_DrawProportionalString( 320, y, "Thank you for playing", UI_CENTER|UI_SMALLFONT, color_white );
|
||||
y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
|
||||
UI_DrawProportionalString( 320, y, "Open Arena", UI_CENTER|UI_SMALLFONT, color_white );
|
||||
|
||||
y += 228;
|
||||
UI_DrawString( 320, y, "Terminating...", UI_CENTER|UI_SMALLFONT, color_red );
|
||||
|
||||
y = 480 - PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
|
||||
UI_DrawProportionalString( 320, y, "www.openarena.ws", UI_CENTER|UI_SMALLFONT, color_white );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
===============
|
||||
@@ -88,9 +98,8 @@ UI_CreditMenu
|
||||
void UI_CreditMenu( void ) {
|
||||
memset( &s_credits, 0 ,sizeof(s_credits) );
|
||||
|
||||
s_credits.menu.draw = UI_CreditMenu_Draw;
|
||||
s_credits.menu.draw = UI_CreditMenu_Draw_IA;
|
||||
s_credits.menu.key = UI_CreditMenu_Key;
|
||||
s_credits.menu.fullscreen = qtrue;
|
||||
UI_PushMenu ( &s_credits.menu );
|
||||
trap_Cmd_ExecuteText( EXEC_APPEND, "wait 2; quit\n" );
|
||||
}
|
||||
|
@@ -36,9 +36,7 @@ MAIN MENU
|
||||
#define ID_MULTIPLAYER 11
|
||||
#define ID_SETUP 12
|
||||
#define ID_DEMOS 13
|
||||
//#define ID_CINEMATICS 14
|
||||
#define ID_CHALLENGES 14
|
||||
#define ID_TEAMARENA 15
|
||||
#define ID_MODS 16
|
||||
#define ID_EXIT 17
|
||||
|
||||
@@ -53,9 +51,7 @@ typedef struct {
|
||||
menutext_s multiplayer;
|
||||
menutext_s setup;
|
||||
menutext_s demos;
|
||||
//menutext_s cinematics;
|
||||
menutext_s challenges;
|
||||
menutext_s teamArena;
|
||||
menutext_s mods;
|
||||
menutext_s exit;
|
||||
|
||||
@@ -72,22 +68,6 @@ typedef struct {
|
||||
|
||||
static errorMessage_t s_errorMessage;
|
||||
|
||||
/*
|
||||
=================
|
||||
MainMenu_ExitAction
|
||||
=================
|
||||
*/
|
||||
/*static void MainMenu_ExitAction( qboolean result ) {
|
||||
if( !result ) {
|
||||
return;
|
||||
}
|
||||
UI_PopMenu();
|
||||
//UI_CreditMenu();
|
||||
trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" );
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
=================
|
||||
Main_MenuEvent
|
||||
@@ -117,12 +97,8 @@ void Main_MenuEvent (void* ptr, int event) {
|
||||
case ID_DEMOS:
|
||||
UI_DemosMenu();
|
||||
break;
|
||||
|
||||
/*case ID_CINEMATICS:
|
||||
UI_CinematicsMenu();
|
||||
break;*/
|
||||
|
||||
case ID_CHALLENGES:
|
||||
|
||||
case ID_CHALLENGES:
|
||||
UI_Challenges();
|
||||
break;
|
||||
|
||||
@@ -130,13 +106,7 @@ void Main_MenuEvent (void* ptr, int event) {
|
||||
UI_ModsMenu();
|
||||
break;
|
||||
|
||||
case ID_TEAMARENA:
|
||||
trap_Cvar_Set( "fs_game", "missionpack");
|
||||
trap_Cmd_ExecuteText( EXEC_APPEND, "vid_restart;" );
|
||||
break;
|
||||
|
||||
case ID_EXIT:
|
||||
//UI_ConfirmMenu( "EXIT GAME?", 0, MainMenu_ExitAction );
|
||||
UI_CreditMenu();
|
||||
break;
|
||||
}
|
||||
@@ -233,45 +203,14 @@ static void Main_MenuDraw( void ) {
|
||||
}
|
||||
|
||||
UI_DrawProportionalString( 320, 372, "", UI_CENTER|UI_SMALLFONT, color );
|
||||
UI_DrawString( 320, 400, "OpenArena(c) 2005-2012 OpenArena Team", UI_CENTER|UI_SMALLFONT, color );
|
||||
UI_DrawString( 320, 414, "OpenArena comes with ABSOLUTELY NO WARRANTY; this is free software", UI_CENTER|UI_SMALLFONT, color );
|
||||
UI_DrawString( 320, 428, "and you are welcome to redistribute it under certain conditions;", UI_CENTER|UI_SMALLFONT, color );
|
||||
UI_DrawString( 320, 444, "read COPYING for details.", UI_CENTER|UI_SMALLFONT, color );
|
||||
UI_DrawString( 320, 400, "Illusion Arena (c) 2025 Yakumo Laboratories", UI_CENTER|UI_SMALLFONT, color );
|
||||
UI_DrawString( 320, 414, "Based on OpenArena (c) 2005-2012 OpenArena Team", UI_CENTER|UI_SMALLFONT, color );
|
||||
|
||||
//Draw version.
|
||||
UI_DrawString( 640-40, 480-14, "^70.8.8", UI_SMALLFONT, color );
|
||||
if((int)trap_Cvar_VariableValue("protocol")!=71)
|
||||
UI_DrawString( 0, 480-14, va("^7Protocol: %i",(int)trap_Cvar_VariableValue("protocol")), UI_SMALLFONT, color);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
===============
|
||||
UI_TeamArenaExists
|
||||
===============
|
||||
*/
|
||||
static qboolean UI_TeamArenaExists( void ) {
|
||||
int numdirs;
|
||||
char dirlist[2048];
|
||||
char *dirptr;
|
||||
char *descptr;
|
||||
int i;
|
||||
int dirlen;
|
||||
|
||||
numdirs = trap_FS_GetFileList( "$modlist", "", dirlist, sizeof(dirlist) );
|
||||
dirptr = dirlist;
|
||||
for( i = 0; i < numdirs; i++ ) {
|
||||
dirlen = strlen( dirptr ) + 1;
|
||||
descptr = dirptr + dirlen;
|
||||
if (Q_stricmp(dirptr, "missionpack") == 0) {
|
||||
return qtrue;
|
||||
}
|
||||
dirptr += dirlen + strlen(descptr) + 1;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
===============
|
||||
UI_MainMenu
|
||||
@@ -283,7 +222,6 @@ and that local cinematics are killed
|
||||
*/
|
||||
void UI_MainMenu( void ) {
|
||||
int y;
|
||||
qboolean teamArena = qfalse;
|
||||
int style = UI_CENTER | UI_DROPSHADOW;
|
||||
|
||||
trap_Cvar_Set( "sv_killserver", "1" );
|
||||
@@ -360,17 +298,6 @@ void UI_MainMenu( void ) {
|
||||
s_main.demos.color = color_red;
|
||||
s_main.demos.style = style;
|
||||
|
||||
/*y += MAIN_MENU_VERTICAL_SPACING;
|
||||
s_main.cinematics.generic.type = MTYPE_PTEXT;
|
||||
s_main.cinematics.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
|
||||
s_main.cinematics.generic.x = 320;
|
||||
s_main.cinematics.generic.y = y;
|
||||
s_main.cinematics.generic.id = ID_CINEMATICS;
|
||||
s_main.cinematics.generic.callback = Main_MenuEvent;
|
||||
s_main.cinematics.string = "CINEMATICS";
|
||||
s_main.cinematics.color = color_red;
|
||||
s_main.cinematics.style = style;*/
|
||||
|
||||
y += MAIN_MENU_VERTICAL_SPACING;
|
||||
s_main.challenges.generic.type = MTYPE_PTEXT;
|
||||
s_main.challenges.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
|
||||
@@ -382,20 +309,6 @@ void UI_MainMenu( void ) {
|
||||
s_main.challenges.color = color_red;
|
||||
s_main.challenges.style = style;
|
||||
|
||||
if (UI_TeamArenaExists()) {
|
||||
teamArena = qtrue;
|
||||
y += MAIN_MENU_VERTICAL_SPACING;
|
||||
s_main.teamArena.generic.type = MTYPE_PTEXT;
|
||||
s_main.teamArena.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
|
||||
s_main.teamArena.generic.x = 320;
|
||||
s_main.teamArena.generic.y = y;
|
||||
s_main.teamArena.generic.id = ID_TEAMARENA;
|
||||
s_main.teamArena.generic.callback = Main_MenuEvent;
|
||||
s_main.teamArena.string = "MISSION PACK";
|
||||
s_main.teamArena.color = color_red;
|
||||
s_main.teamArena.style = style;
|
||||
}
|
||||
|
||||
y += MAIN_MENU_VERTICAL_SPACING;
|
||||
s_main.mods.generic.type = MTYPE_PTEXT;
|
||||
s_main.mods.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
|
||||
@@ -422,11 +335,7 @@ void UI_MainMenu( void ) {
|
||||
Menu_AddItem( &s_main.menu, &s_main.multiplayer );
|
||||
Menu_AddItem( &s_main.menu, &s_main.setup );
|
||||
Menu_AddItem( &s_main.menu, &s_main.demos );
|
||||
//Menu_AddItem( &s_main.menu, &s_main.cinematics );
|
||||
Menu_AddItem( &s_main.menu, &s_main.challenges );
|
||||
if (teamArena) {
|
||||
Menu_AddItem( &s_main.menu, &s_main.teamArena );
|
||||
}
|
||||
Menu_AddItem( &s_main.menu, &s_main.mods );
|
||||
Menu_AddItem( &s_main.menu, &s_main.exit );
|
||||
|
||||
|
@@ -228,7 +228,7 @@ static void UI_SPSkillMenu_Init( void ) {
|
||||
skillMenuInfo.item_baby.generic.y = 170;
|
||||
skillMenuInfo.item_baby.generic.callback = UI_SPSkillMenu_SkillEvent;
|
||||
skillMenuInfo.item_baby.generic.id = ID_BABY;
|
||||
skillMenuInfo.item_baby.string = "I Can Win";
|
||||
skillMenuInfo.item_baby.string = "Easy";
|
||||
skillMenuInfo.item_baby.color = color_red;
|
||||
skillMenuInfo.item_baby.style = UI_CENTER;
|
||||
|
||||
@@ -238,7 +238,7 @@ static void UI_SPSkillMenu_Init( void ) {
|
||||
skillMenuInfo.item_easy.generic.y = 198;
|
||||
skillMenuInfo.item_easy.generic.callback = UI_SPSkillMenu_SkillEvent;
|
||||
skillMenuInfo.item_easy.generic.id = ID_EASY;
|
||||
skillMenuInfo.item_easy.string = "Bring It On";
|
||||
skillMenuInfo.item_easy.string = "Normal";
|
||||
skillMenuInfo.item_easy.color = color_red;
|
||||
skillMenuInfo.item_easy.style = UI_CENTER;
|
||||
|
||||
@@ -248,7 +248,7 @@ static void UI_SPSkillMenu_Init( void ) {
|
||||
skillMenuInfo.item_medium.generic.y = 227;
|
||||
skillMenuInfo.item_medium.generic.callback = UI_SPSkillMenu_SkillEvent;
|
||||
skillMenuInfo.item_medium.generic.id = ID_MEDIUM;
|
||||
skillMenuInfo.item_medium.string = "Hurt Me Plenty";
|
||||
skillMenuInfo.item_medium.string = "Hard";
|
||||
skillMenuInfo.item_medium.color = color_red;
|
||||
skillMenuInfo.item_medium.style = UI_CENTER;
|
||||
|
||||
@@ -258,7 +258,7 @@ static void UI_SPSkillMenu_Init( void ) {
|
||||
skillMenuInfo.item_hard.generic.y = 255;
|
||||
skillMenuInfo.item_hard.generic.callback = UI_SPSkillMenu_SkillEvent;
|
||||
skillMenuInfo.item_hard.generic.id = ID_HARD;
|
||||
skillMenuInfo.item_hard.string = "Hardcore";
|
||||
skillMenuInfo.item_hard.string = "Insane";
|
||||
skillMenuInfo.item_hard.color = color_red;
|
||||
skillMenuInfo.item_hard.style = UI_CENTER;
|
||||
|
||||
@@ -268,7 +268,7 @@ static void UI_SPSkillMenu_Init( void ) {
|
||||
skillMenuInfo.item_nightmare.generic.y = 283;
|
||||
skillMenuInfo.item_nightmare.generic.callback = UI_SPSkillMenu_SkillEvent;
|
||||
skillMenuInfo.item_nightmare.generic.id = ID_NIGHTMARE;
|
||||
skillMenuInfo.item_nightmare.string = "NIGHTMARE!";
|
||||
skillMenuInfo.item_nightmare.string = "LUNATIC!";
|
||||
skillMenuInfo.item_nightmare.color = color_red;
|
||||
skillMenuInfo.item_nightmare.style = UI_CENTER;
|
||||
|
||||
|
@@ -708,7 +708,6 @@ SERVER OPTIONS MENU *****
|
||||
|
||||
#define ID_PLAYER_TYPE 25
|
||||
#define ID_MAXCLIENTS 26
|
||||
//#define ID_DEDICATED 27
|
||||
#define ID_GO 28
|
||||
#define ID_BACK 29
|
||||
|
||||
@@ -723,7 +722,6 @@ typedef struct {
|
||||
menubitmap_s mappic;
|
||||
menubitmap_s picframe;
|
||||
|
||||
// menulist_s dedicated;
|
||||
menufield_s timelimit;
|
||||
menufield_s fraglimit;
|
||||
menufield_s flaglimit;
|
||||
@@ -783,11 +781,11 @@ static const char *playerTeam_list[] = {
|
||||
};
|
||||
|
||||
static const char *botSkill_list[] = {
|
||||
"I Can Win",
|
||||
"Bring It On",
|
||||
"Hurt Me Plenty",
|
||||
"Hardcore",
|
||||
"Nightmare!",
|
||||
"Easy",
|
||||
"Normal",
|
||||
"Hard",
|
||||
"Insane",
|
||||
"Lunatic",
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -842,7 +840,6 @@ static void ServerOptions_Start( void ) {
|
||||
int timelimit;
|
||||
int fraglimit;
|
||||
int maxclients;
|
||||
// int dedicated;
|
||||
int friendlyfire;
|
||||
int flaglimit;
|
||||
int pure;
|
||||
@@ -861,7 +858,6 @@ static void ServerOptions_Start( void ) {
|
||||
timelimit = atoi( s_serveroptions.timelimit.field.buffer );
|
||||
fraglimit = atoi( s_serveroptions.fraglimit.field.buffer );
|
||||
flaglimit = atoi( s_serveroptions.flaglimit.field.buffer );
|
||||
// dedicated = s_serveroptions.dedicated.curvalue;
|
||||
friendlyfire = s_serveroptions.friendlyfire.curvalue;
|
||||
pure = s_serveroptions.pure.curvalue;
|
||||
lan = s_serveroptions.lan.curvalue;
|
||||
|
@@ -221,6 +221,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#define ARCH_STRING "i386"
|
||||
#elif defined __axp__
|
||||
#define ARCH_STRING "alpha"
|
||||
#elif defined __amd64__
|
||||
#define ARCH_STRING "x86_64"
|
||||
#endif
|
||||
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
|
@@ -26,17 +26,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
// q_shared.h -- included first by ALL program modules.
|
||||
// A user mod should never modify this file
|
||||
|
||||
//#ifdef STANDALONE
|
||||
#define PRODUCT_NAME "ioq3+oa"
|
||||
#define BASEGAME "baseoa"
|
||||
#define CLIENT_WINDOW_TITLE "OpenArena"
|
||||
#define CLIENT_WINDOW_MIN_TITLE "OA"
|
||||
/*#else
|
||||
#define PRODUCT_NAME "ioq3"
|
||||
#define BASEGAME "baseq3"
|
||||
#define CLIENT_WINDOW_TITLE "ioquake3"
|
||||
#define CLIENT_WINDOW_MIN_TITLE "ioq3"
|
||||
#endif*/
|
||||
#define PRODUCT_NAME "ioq3+ia"
|
||||
#define BASEGAME "baseia"
|
||||
#define CLIENT_WINDOW_TITLE "Illusion Arena"
|
||||
#define CLIENT_WINDOW_MIN_TITLE "IA"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define PRODUCT_VERSION "1.35"
|
||||
@@ -186,6 +179,8 @@ typedef int clipHandle_t;
|
||||
#define MAX_QINT 0x7fffffff
|
||||
#define MIN_QINT (-MAX_QINT-1)
|
||||
|
||||
#define ARRAY_LEN(x) (sizeof(x) / sizeof(*(x)))
|
||||
|
||||
|
||||
// angle indexes
|
||||
#define PITCH 0 // up / down
|
||||
|
@@ -63,7 +63,7 @@ char *ex_argv[MAX_EX_ARGC];
|
||||
void ExpandWildcards( int *argc, char ***argv )
|
||||
{
|
||||
struct _finddata_t fileinfo;
|
||||
int handle;
|
||||
intptr_t handle;
|
||||
int i;
|
||||
char filename[1024];
|
||||
char filebase[1024];
|
||||
@@ -185,7 +185,7 @@ void _printf( const char *format, ... ) {
|
||||
vsprintf (text, format, argptr);
|
||||
va_end (argptr);
|
||||
|
||||
printf(text);
|
||||
printf("%s", text);
|
||||
|
||||
#ifdef WIN32
|
||||
if (!lookedForServer) {
|
||||
@@ -396,10 +396,12 @@ void Q_getwd (char *out)
|
||||
int i = 0;
|
||||
|
||||
#ifdef WIN32
|
||||
_getcwd (out, 256);
|
||||
if (_getcwd (out, 256) == NULL)
|
||||
strcpy(out, "."); /* shrug */
|
||||
strcat (out, "\\");
|
||||
#else
|
||||
getcwd (out, 256);
|
||||
if (getcwd (out, 256) == NULL)
|
||||
strcpy(out, "."); /* shrug */
|
||||
strcat (out, "/");
|
||||
#endif
|
||||
|
||||
@@ -732,7 +734,7 @@ int LoadFile( const char *filename, void **bufferptr )
|
||||
==============
|
||||
LoadFileBlock
|
||||
-
|
||||
rounds up memory allocation to 4K boundry
|
||||
rounds up memory allocation to 4K boundary
|
||||
-
|
||||
==============
|
||||
*/
|
||||
@@ -808,7 +810,7 @@ void DefaultExtension (char *path, const char *extension)
|
||||
{
|
||||
char *src;
|
||||
//
|
||||
// if path doesnt have a .EXT, append extension
|
||||
// if path doesn't have a .EXT, append extension
|
||||
// (extension should include the .)
|
||||
//
|
||||
src = path + strlen(path) - 1;
|
||||
|
@@ -59,7 +59,7 @@ typedef unsigned char byte;
|
||||
#define MAX_OS_PATH 1024
|
||||
#define MEM_BLOCKSIZE 4096
|
||||
|
||||
// the dec offsetof macro doesnt work very well...
|
||||
// the dec offsetof macro doesn't work very well...
|
||||
#define myoffsetof(type,identifier) ((size_t)&((type *)0)->identifier)
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ char *strupr (char *in);
|
||||
char *strlower (char *in);
|
||||
int Q_strncasecmp( const char *s1, const char *s2, int n );
|
||||
int Q_stricmp( const char *s1, const char *s2 );
|
||||
#define Q_strequal(s1,s2) (Q_stricmp(s1,s2)==0)
|
||||
void Q_getwd( char *out );
|
||||
|
||||
int Q_filelength (FILE *f);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
|
||||
don't do any paramter conversion (double to float, etc)
|
||||
don't do any parameter conversion (double to float, etc)
|
||||
|
||||
|
||||
|
||||
|
@@ -250,7 +250,6 @@ static void hashtable_init (hashtable_t *H, int buckets)
|
||||
{
|
||||
H->buckets = buckets;
|
||||
H->table = calloc(H->buckets, sizeof(*(H->table)));
|
||||
return;
|
||||
}
|
||||
|
||||
static hashtable_t *hashtable_new (int buckets)
|
||||
@@ -285,7 +284,6 @@ static void hashtable_add (hashtable_t *H, int hashvalue, void *datum)
|
||||
}
|
||||
hc->data = datum;
|
||||
hc->next = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
static hashchain_t *hashtable_get (hashtable_t *H, int hashvalue)
|
||||
@@ -386,8 +384,12 @@ static void sort_symbols ()
|
||||
symbol_t *s;
|
||||
symbol_t **symlist;
|
||||
|
||||
if(!symbols)
|
||||
return;
|
||||
|
||||
//crumb("sort_symbols: Constructing symlist array\n");
|
||||
for (elems = 0, s = symbols; s; s = s->next, elems++) /* nop */ ;
|
||||
|
||||
symlist = malloc(elems * sizeof(symbol_t*));
|
||||
for (i = 0, s = symbols; s; s = s->next, i++)
|
||||
{
|
||||
@@ -475,7 +477,7 @@ static unsigned int HashString (const char *key)
|
||||
acc = (acc << 2) | (acc >> 30);
|
||||
acc &= 0xffffffffU;
|
||||
}
|
||||
return abs(acc);
|
||||
return acc;
|
||||
}
|
||||
|
||||
|
||||
@@ -489,10 +491,10 @@ static void CodeError( char *fmt, ... ) {
|
||||
|
||||
errorCount++;
|
||||
|
||||
report( "%s:%i ", currentFileName, currentFileLine );
|
||||
fprintf( stderr, "%s:%i ", currentFileName, currentFileLine );
|
||||
|
||||
va_start( argptr,fmt );
|
||||
vprintf( fmt,argptr );
|
||||
vfprintf( stderr, fmt, argptr );
|
||||
va_end( argptr );
|
||||
}
|
||||
|
||||
@@ -786,7 +788,7 @@ HackToSegment
|
||||
|
||||
BIG HACK: I want to put all 32 bit values in the data
|
||||
segment so they can be byte swapped, and all char data in the lit
|
||||
segment, but switch jump tables are emited in the lit segment and
|
||||
segment, but switch jump tables are emitted in the lit segment and
|
||||
initialized strng variables are put in the data segment.
|
||||
|
||||
I can change segments here, but I also need to fixup the
|
||||
@@ -946,12 +948,11 @@ STAT("PROC");
|
||||
|
||||
ASM(ENDPROC)
|
||||
{
|
||||
int v, v2;
|
||||
if ( !strcmp( token, "endproc" ) ) {
|
||||
STAT("ENDPROC");
|
||||
Parse(); // skip the function name
|
||||
v = ParseValue(); // locals
|
||||
v2 = ParseValue(); // arg marshalling
|
||||
ParseValue(); // locals
|
||||
ParseValue(); // arg marshalling
|
||||
|
||||
// all functions must leave something on the opstack
|
||||
instructionCount++;
|
||||
@@ -1128,7 +1129,7 @@ STAT("BYTE");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// code labels are emited as instruction counts, not byte offsets,
|
||||
// code labels are emitted as instruction counts, not byte offsets,
|
||||
// because the physical size of the code will change with
|
||||
// different run time compilers and we want to minimize the
|
||||
// size of the required translation table
|
||||
@@ -1520,12 +1521,13 @@ static void ShowHelp( char *argv0 ) {
|
||||
Error("Usage: %s [OPTION]... [FILES]...\n\
|
||||
Assemble LCC bytecode assembly to Q3VM bytecode.\n\
|
||||
\n\
|
||||
-o OUTPUT Write assembled output to file OUTPUT.qvm\n\
|
||||
-f LISTFILE Read options and list of files to assemble from LISTFILE.q3asm\n\
|
||||
-b BUCKETS Set symbol hash table to BUCKETS buckets\n\
|
||||
-v Verbose compilation report\n\
|
||||
-vq3 Produce a qvm file compatible with Q3 1.32b\n\
|
||||
-h --help -? Show this help\n\
|
||||
-o OUTPUT Write assembled output to file OUTPUT.qvm\n\
|
||||
-f LISTFILE Read options and list of files to assemble from LISTFILE.q3asm\n\
|
||||
-b BUCKETS Set symbol hash table to BUCKETS buckets\n\
|
||||
-m Generate a mapfile for each OUTPUT.qvm\n\
|
||||
-v Verbose compilation report\n\
|
||||
-vq3 Produce a qvm file compatible with Q3 1.32b\n\
|
||||
-h --help -? Show this help\n\
|
||||
", argv0);
|
||||
}
|
||||
|
||||
@@ -1562,7 +1564,7 @@ int main( int argc, char **argv ) {
|
||||
|
||||
if ( !strcmp( argv[i], "-o" ) ) {
|
||||
if ( i == argc - 1 ) {
|
||||
Error( "-o must preceed a filename" );
|
||||
Error( "-o must precede a filename" );
|
||||
}
|
||||
/* Timbo of Tremulous pointed out -o not working; stock ID q3asm folded in the change. Yay. */
|
||||
strcpy( outputFilename, argv[ i+1 ] );
|
||||
@@ -1572,7 +1574,7 @@ int main( int argc, char **argv ) {
|
||||
|
||||
if ( !strcmp( argv[i], "-f" ) ) {
|
||||
if ( i == argc - 1 ) {
|
||||
Error( "-f must preceed a filename" );
|
||||
Error( "-f must precede a filename" );
|
||||
}
|
||||
ParseOptionFile( argv[ i+1 ] );
|
||||
i++;
|
||||
@@ -1618,7 +1620,7 @@ Motivation: not wanting to scrollback for pages to find asm error.
|
||||
}
|
||||
// In some case it Segfault without this check
|
||||
if ( numAsmFiles == 0 ) {
|
||||
Error( "No file to assemble\n" );
|
||||
Error( "No file to assemble" );
|
||||
}
|
||||
|
||||
InitTables();
|
||||
|
@@ -9,7 +9,7 @@ char rcsid[] = "cpp.c - faked rcsid";
|
||||
|
||||
#define OUTS 16384
|
||||
char outbuf[OUTS];
|
||||
char *outp = outbuf;
|
||||
char *outbufp = outbuf;
|
||||
Source *cursource;
|
||||
int nerrs;
|
||||
struct token nltoken = { NL, 0, 0, 0, 1, (uchar*)"\n" };
|
||||
@@ -19,6 +19,15 @@ int ifdepth;
|
||||
int ifsatisfied[NIF];
|
||||
int skipping;
|
||||
|
||||
time_t reproducible_time()
|
||||
{
|
||||
char *source_date_epoch;
|
||||
time_t t;
|
||||
if ((source_date_epoch = getenv("SOURCE_DATE_EPOCH")) == NULL ||
|
||||
(t = (time_t)strtol(source_date_epoch, NULL, 10)) <= 0)
|
||||
return time(NULL);
|
||||
return t;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
@@ -28,7 +37,7 @@ main(int argc, char **argv)
|
||||
char ebuf[BUFSIZ];
|
||||
|
||||
setbuf(stderr, ebuf);
|
||||
t = time(NULL);
|
||||
t = reproducible_time();
|
||||
curtime = ctime(&t);
|
||||
maketokenrow(3, &tr);
|
||||
expandlex();
|
||||
@@ -51,7 +60,7 @@ process(Tokenrow *trp)
|
||||
for (;;) {
|
||||
if (trp->tp >= trp->lp) {
|
||||
trp->tp = trp->lp = trp->bp;
|
||||
outp = outbuf;
|
||||
outbufp = outbuf;
|
||||
anymacros |= gettokens(trp, 1);
|
||||
trp->tp = trp->bp;
|
||||
}
|
||||
@@ -250,7 +259,6 @@ control(Tokenrow *trp)
|
||||
break;
|
||||
}
|
||||
setempty(trp);
|
||||
return;
|
||||
}
|
||||
|
||||
void *
|
||||
|
@@ -143,7 +143,7 @@ void setobjname(char *);
|
||||
|
||||
char *basepath( char *fname );
|
||||
|
||||
extern char *outp;
|
||||
extern char *outbufp;
|
||||
extern Token nltoken;
|
||||
extern Source *cursource;
|
||||
extern char *curtime;
|
||||
|
@@ -108,7 +108,6 @@ doinclude(Tokenrow *trp)
|
||||
return;
|
||||
syntax:
|
||||
error(ERROR, "Syntax error in #include");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -121,7 +120,7 @@ genline(void)
|
||||
static Tokenrow tr = { &ta, &ta, &ta+1, 1 };
|
||||
uchar *p;
|
||||
|
||||
ta.t = p = (uchar*)outp;
|
||||
ta.t = p = (uchar*)outbufp;
|
||||
strcpy((char*)p, "#line ");
|
||||
p += sizeof("#line ")-1;
|
||||
p = (uchar*)outnum((char*)p, cursource->line);
|
||||
@@ -134,8 +133,8 @@ genline(void)
|
||||
strcpy((char*)p, cursource->filename);
|
||||
p += strlen((char*)p);
|
||||
*p++ = '"'; *p++ = '\n';
|
||||
ta.len = (char*)p-outp;
|
||||
outp = (char*)p;
|
||||
ta.len = (char*)p-outbufp;
|
||||
outbufp = (char*)p;
|
||||
tr.tp = tr.bp;
|
||||
puttokens(&tr);
|
||||
}
|
||||
|
@@ -511,6 +511,25 @@ foldline(Source *s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// This doesn't have proper tracking across read() to only remove \r from \r\n sequence.
|
||||
// The lexer doesn't correctly handle standalone \r anyway though.
|
||||
int
|
||||
crlf_to_lf(unsigned char *buf, int n) {
|
||||
int i, count;
|
||||
|
||||
count = 0;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
if (buf[i] == '\r') {
|
||||
continue;
|
||||
}
|
||||
|
||||
buf[count++] = buf[i];
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
int
|
||||
fillbuf(Source *s)
|
||||
{
|
||||
@@ -521,6 +540,7 @@ fillbuf(Source *s)
|
||||
error(FATAL, "Input buffer overflow");
|
||||
if (s->fd<0 || (n=read(s->fd, (char *)s->inl, INS/8)) <= 0)
|
||||
n = 0;
|
||||
n = crlf_to_lf(s->inl, n);
|
||||
if ((*s->inp&0xff) == EOB) /* sentinel character appears in input */
|
||||
*s->inp = EOFC;
|
||||
s->inl += n;
|
||||
|
@@ -218,7 +218,6 @@ expand(Tokenrow *trp, Nlist *np)
|
||||
insertrow(trp, ntokc, &ntr);
|
||||
trp->tp -= rowlen(&ntr);
|
||||
dofree(ntr.bp);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -471,10 +470,10 @@ builtin(Tokenrow *trp, int biname)
|
||||
/* most are strings */
|
||||
tp->type = STRING;
|
||||
if (tp->wslen) {
|
||||
*outp++ = ' ';
|
||||
*outbufp++ = ' ';
|
||||
tp->wslen = 1;
|
||||
}
|
||||
op = outp;
|
||||
op = outbufp;
|
||||
*op++ = '"';
|
||||
switch (biname) {
|
||||
|
||||
@@ -509,7 +508,7 @@ builtin(Tokenrow *trp, int biname)
|
||||
}
|
||||
if (tp->type==STRING)
|
||||
*op++ = '"';
|
||||
tp->t = (uchar*)outp;
|
||||
tp->len = op - outp;
|
||||
outp = op;
|
||||
tp->t = (uchar*)outbufp;
|
||||
tp->len = op - outbufp;
|
||||
outbufp = op;
|
||||
}
|
||||
|
@@ -267,7 +267,7 @@ peektokens(Tokenrow *trp, char *str)
|
||||
if (str)
|
||||
fprintf(stderr, "%s ", str);
|
||||
if (tp<trp->bp || tp>trp->lp)
|
||||
fprintf(stderr, "(tp offset %d) ", tp-trp->bp);
|
||||
fprintf(stderr, "(tp offset %ld) ", (long int) (tp - trp->bp));
|
||||
for (tp=trp->bp; tp<trp->lp && tp<trp->bp+32; tp++) {
|
||||
if (tp->type!=NL) {
|
||||
int c = tp->t[tp->len];
|
||||
@@ -315,7 +315,7 @@ puttokens(Tokenrow *trp)
|
||||
if (wbp >= &wbuf[OBS]) {
|
||||
write(1, wbuf, OBS);
|
||||
if (wbp > &wbuf[OBS])
|
||||
memcpy(wbuf, wbuf+OBS, wbp - &wbuf[OBS]);
|
||||
memmove(wbuf, wbuf+OBS, wbp - &wbuf[OBS]);
|
||||
wbp -= OBS;
|
||||
}
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include "cpp.h"
|
||||
|
||||
extern int lcc_getopt(int, char *const *, const char *);
|
||||
@@ -64,11 +65,22 @@ setup(int argc, char **argv)
|
||||
fp = (char*)newstring((uchar*)argv[optind], strlen(argv[optind]), 0);
|
||||
if ((fd = open(fp, 0)) <= 0)
|
||||
error(FATAL, "Can't open input file %s", fp);
|
||||
#ifdef WIN32
|
||||
_setmode(fd, _O_BINARY);
|
||||
#endif
|
||||
}
|
||||
if (optind+1<argc) {
|
||||
int fdo = creat(argv[optind+1], 0666);
|
||||
int fdo;
|
||||
#ifdef WIN32
|
||||
fdo = creat(argv[optind+1], _S_IREAD | _S_IWRITE);
|
||||
#else
|
||||
fdo = creat(argv[optind+1], 0666);
|
||||
#endif
|
||||
if (fdo<0)
|
||||
error(FATAL, "Can't open output file %s", argv[optind+1]);
|
||||
#ifdef WIN32
|
||||
_setmode(fdo, _O_BINARY);
|
||||
#endif
|
||||
dup2(fdo, 1);
|
||||
}
|
||||
if(Mflag)
|
||||
@@ -99,7 +111,8 @@ char *basepath( char *fname )
|
||||
/* memmove is defined here because some vendors don't provide it at
|
||||
all and others do a terrible job (like calling malloc) */
|
||||
// -- ouch, that hurts -- ln
|
||||
#ifndef MACOS_X /* always use the system memmove() on Mac OS X. --ryan. */
|
||||
/* always use the system memmove() on Mac OS X. --ryan. */
|
||||
#if !defined(__APPLE__) && !defined(_MSC_VER)
|
||||
#ifdef memmove
|
||||
#undef memmove
|
||||
#endif
|
||||
@@ -109,7 +122,7 @@ memmove(void *dp, const void *sp, size_t n)
|
||||
unsigned char *cdp, *csp;
|
||||
|
||||
if (n<=0)
|
||||
return 0;
|
||||
return dp;
|
||||
cdp = dp;
|
||||
csp = (unsigned char *)sp;
|
||||
if (cdp < csp) {
|
||||
@@ -123,6 +136,6 @@ memmove(void *dp, const void *sp, size_t n)
|
||||
*--cdp = *--csp;
|
||||
} while (--n);
|
||||
}
|
||||
return 0;
|
||||
return dp;
|
||||
}
|
||||
#endif
|
||||
|
@@ -41,7 +41,7 @@ and insisted that pointers fit in unsigned integers (see Sec. 5.1 of <cite>A Ret
|
||||
C Compiler</cite>). These assumptions simplified the compiler, and were suitable for
|
||||
32-bit architectures. But on 64-bit architectures, such as the DEC ALPHA, it's natural to
|
||||
have four sizes of integers and perhaps three sizes of floats, and on 16-bit
|
||||
architectures, 32-bit pointers don't fit in unsigned integers. Also, the 3.x constaints
|
||||
architectures, 32-bit pointers don't fit in unsigned integers. Also, the 3.x constraints
|
||||
limited the use of lcc's back ends for other languages, such as Java.</p>
|
||||
|
||||
<p>Version 4.x removes all of these restrictions: It supports any number of sizes for
|
||||
@@ -99,7 +99,7 @@ the symbol's <code>type</code> field.</p>
|
||||
|
||||
<h2><a NAME="operators">5.5 Dag Operators</a></h2>
|
||||
|
||||
<p>The <code>op</code> field a of <code>node</code> structure holds a dag operator, which
|
||||
<p>The <code>op</code> field of a <code>node</code> structure holds a dag operator, which
|
||||
consists of a generic operator, a type suffix, and a size indicator. The type suffixes
|
||||
are:</p>
|
||||
|
||||
@@ -516,14 +516,14 @@ e.g.,</p>
|
||||
<p>The type suffix for a conversion operator denotes the type of the result and the size
|
||||
indicator gives the size of the result. For example, <code>CVUI4</code> converts an
|
||||
unsigned (<code>U</code>) to a 4-byte signed integer (<code>I4</code>). The <code>syms[0]</code>
|
||||
field points to a symbol-table entry for a integer constant that gives the size of the
|
||||
field points to a symbol-table entry for an integer constant that gives the size of the
|
||||
source operand. For example, if <code>syms[0]</code> in a <code>CVUI4</code> points to a
|
||||
symbol-table entry for 2, the conversion widens a 2-byte unsigned integer to a 4-byte
|
||||
signed integer. Conversions that widen unsigned integers zero-extend; those that widen
|
||||
signed integers sign-extend.</p>
|
||||
|
||||
<p>The front end composes conversions between types <em>T</em><sub>1</sub> and <em>T</em><sub>2</sub>
|
||||
by widening <em>T</em><sub>1</sub> to it's "supertype", if necessary, converting
|
||||
by widening <em>T</em><sub>1</sub> to its "supertype", if necessary, converting
|
||||
that result to <em>T</em><sub>2</sub>'s supertype, then narrowing the result to <em>T</em><sub>2</sub>,
|
||||
if necessary. The following table lists the supertypes; omitted entries are their own
|
||||
supertypes.</p>
|
||||
|
@@ -722,7 +722,7 @@ C:\dist\lcc\4.1>copy %BUILDDIR%\bprint.exe \bin
|
||||
<h2><a NAME="bugs">Reporting Bugs</a></h2>
|
||||
|
||||
<p>lcc is a large, complex program. We find and repair errors routinely. If you think that
|
||||
you've found a error, follow the steps below, which are adapted from the instructions in
|
||||
you've found an error, follow the steps below, which are adapted from the instructions in
|
||||
Chapter 1 of <cite>A Retargetable C Compiler: Design and Implementation</cite>.
|
||||
|
||||
<ol>
|
||||
@@ -751,7 +751,7 @@ Chapter 1 of <cite>A Retargetable C Compiler: Design and Implementation</cite>.
|
||||
HREF="ftp://ftp.cs.princeton.edu/pub/lcc"><code>pub/lcc</code></a>. A <a
|
||||
HREF="ftp://ftp.cs.princeton.edu/pub/lcc/README"><code>README</code></a> file there gives
|
||||
acquistion details, and the <a HREF="../LOG"><code>LOG</code></a> file reports what errors
|
||||
were fixed and when they were fixed. If you report a error that's been fixed, you might
|
||||
were fixed and when they were fixed. If you report an error that's been fixed, you might
|
||||
get a canned reply.</li>
|
||||
<li>Send your program by electronic mail to <code>lcc-bugs@cs.princeton.edu</code>. Please
|
||||
send only valid C programs; put all remarks in C comments so that we can process reports
|
||||
|
@@ -34,9 +34,14 @@ void UpdatePaths( const char *lccBinary )
|
||||
{
|
||||
char basepath[ 1024 ];
|
||||
char *p;
|
||||
size_t basepathsz = sizeof( basepath ) - 1;
|
||||
|
||||
strncpy( basepath, lccBinary, 1024 );
|
||||
p = strrchr( basepath, PATH_SEP );
|
||||
strncpy( basepath, lccBinary, basepathsz );
|
||||
basepath[basepathsz] = 0;
|
||||
p = strrchr( basepath, '/' );
|
||||
|
||||
if( !p )
|
||||
p = strrchr( basepath, '\\' );
|
||||
|
||||
if( p )
|
||||
{
|
||||
@@ -52,6 +57,10 @@ int option(char *arg) {
|
||||
cpp[0] = concat(&arg[8], "/q3cpp" BINEXT);
|
||||
include[0] = concat("-I", concat(&arg[8], "/include"));
|
||||
com[0] = concat(&arg[8], "/q3rcc" BINEXT);
|
||||
} else if (strncmp(arg, "-lcppdir=", 9) == 0) {
|
||||
cpp[0] = concat(&arg[9], "/q3cpp" BINEXT);
|
||||
} else if (strncmp(arg, "-lrccdir=", 9) == 0) {
|
||||
com[0] = concat(&arg[9], "/q3rcc" BINEXT);
|
||||
} else if (strcmp(arg, "-p") == 0 || strcmp(arg, "-pg") == 0) {
|
||||
fprintf( stderr, "no profiling supported, %s ignored.\n", arg);
|
||||
} else if (strcmp(arg, "-b") == 0)
|
||||
|
@@ -11,7 +11,12 @@ static char rcsid[] = "Id: dummy rcsid";
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
#ifdef WIN32
|
||||
#include <process.h> /* getpid() */
|
||||
#include <io.h> /* access() */
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef TEMPDIR
|
||||
#define TEMPDIR "/tmp"
|
||||
@@ -217,14 +222,74 @@ char *basename(char *name) {
|
||||
|
||||
#ifdef WIN32
|
||||
#include <process.h>
|
||||
|
||||
static char *escapeDoubleQuotes(const char *string) {
|
||||
int stringLength = strlen(string);
|
||||
int bufferSize = stringLength + 1;
|
||||
int i, j;
|
||||
char *newString;
|
||||
|
||||
if (string == NULL)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < stringLength; i++) {
|
||||
if (string[i] == '"')
|
||||
bufferSize++;
|
||||
}
|
||||
|
||||
newString = (char*)malloc(bufferSize);
|
||||
|
||||
if (newString == NULL)
|
||||
return NULL;
|
||||
|
||||
for (i = 0, j = 0; i < stringLength; i++) {
|
||||
if (string[i] == '"')
|
||||
newString[j++] = '\\';
|
||||
|
||||
newString[j++] = string[i];
|
||||
}
|
||||
|
||||
newString[j] = '\0';
|
||||
|
||||
return newString;
|
||||
}
|
||||
|
||||
static int spawn(const char *cmdname, char **argv) {
|
||||
int argc = 0;
|
||||
char **newArgv = argv;
|
||||
int i;
|
||||
intptr_t exitStatus;
|
||||
|
||||
// _spawnvp removes double quotes from arguments, so we
|
||||
// have to escape them manually
|
||||
while (*newArgv++ != NULL)
|
||||
argc++;
|
||||
|
||||
newArgv = (char **)malloc(sizeof(char*) * (argc + 1));
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
newArgv[i] = escapeDoubleQuotes(argv[i]);
|
||||
|
||||
newArgv[argc] = NULL;
|
||||
|
||||
exitStatus = _spawnvp(_P_WAIT, cmdname, (const char *const *)newArgv);
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
free(newArgv[i]);
|
||||
|
||||
free(newArgv);
|
||||
return exitStatus;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define _P_WAIT 0
|
||||
#ifndef __sun
|
||||
extern int fork(void);
|
||||
#endif
|
||||
extern int wait(int *);
|
||||
|
||||
static int _spawnvp(int mode, const char *cmdname, char *argv[]) {
|
||||
static int spawn(const char *cmdname, char **argv) {
|
||||
int pid, n, status;
|
||||
|
||||
switch (pid = fork()) {
|
||||
@@ -292,11 +357,7 @@ static int callsys(char **av) {
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
if (verbose < 2)
|
||||
#ifndef WIN32
|
||||
status = _spawnvp(_P_WAIT, executable, argv);
|
||||
#else
|
||||
status = _spawnvp(_P_WAIT, executable, (const char* const*)argv);
|
||||
#endif
|
||||
status = spawn(executable, argv);
|
||||
if (status == -1) {
|
||||
fprintf(stderr, "%s: ", progname);
|
||||
perror(argv[0]);
|
||||
@@ -575,7 +636,7 @@ static void opt(char *arg) {
|
||||
clist = append(&arg[3], clist);
|
||||
return;
|
||||
}
|
||||
break; /* and fall thru */
|
||||
break; /* and fall through */
|
||||
case 'a':
|
||||
alist = append(&arg[3], alist);
|
||||
return;
|
||||
@@ -757,10 +818,9 @@ char *strsave(const char *str) {
|
||||
char *stringf(const char *fmt, ...) {
|
||||
char buf[1024];
|
||||
va_list ap;
|
||||
int n;
|
||||
|
||||
va_start(ap, fmt);
|
||||
n = vsprintf(buf, fmt, ap);
|
||||
vsprintf(buf, fmt, ap);
|
||||
va_end(ap);
|
||||
return strsave(buf);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -70,12 +70,32 @@ static char buf[BUFSIZ], *bp = buf;
|
||||
static int ppercent = 0;
|
||||
static int code = 0;
|
||||
|
||||
static void crlf_to_lf(char *buf, int bufmax) {
|
||||
int i, count;
|
||||
|
||||
count = 0;
|
||||
|
||||
for (i = 0; i < bufmax; i++) {
|
||||
if (buf[i] == '\r' && buf[i+1] == '\n') {
|
||||
// skip '\r'
|
||||
continue;
|
||||
}
|
||||
|
||||
buf[count++] = buf[i];
|
||||
|
||||
if (buf[i] == '\0') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int get(void) {
|
||||
if (*bp == 0) {
|
||||
bp = buf;
|
||||
*bp = 0;
|
||||
if (fgets(buf, sizeof buf, infp) == NULL)
|
||||
return EOF;
|
||||
crlf_to_lf(buf, sizeof buf);
|
||||
yylineno++;
|
||||
while (buf[0] == '%' && buf[1] == '{' && buf[2] == '\n') {
|
||||
for (;;) {
|
||||
@@ -83,6 +103,7 @@ static int get(void) {
|
||||
yywarn("unterminated %{...%}\n");
|
||||
return EOF;
|
||||
}
|
||||
crlf_to_lf(buf, sizeof buf);
|
||||
yylineno++;
|
||||
if (strcmp(buf, "%}\n") == 0)
|
||||
break;
|
||||
@@ -90,6 +111,7 @@ static int get(void) {
|
||||
}
|
||||
if (fgets(buf, sizeof buf, infp) == NULL)
|
||||
return EOF;
|
||||
crlf_to_lf(buf, sizeof buf);
|
||||
yylineno++;
|
||||
}
|
||||
}
|
||||
@@ -199,4 +221,5 @@ void yywarn(char *fmt, ...) {
|
||||
fprintf(stderr, "line %d: ", yylineno);
|
||||
fprintf(stderr, "warning: ");
|
||||
vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
@@ -56,14 +56,14 @@ int main(int argc, char *argv[]) {
|
||||
} else if (infp == NULL) {
|
||||
if (strcmp(argv[i], "-") == 0)
|
||||
infp = stdin;
|
||||
else if ((infp = fopen(argv[i], "r")) == NULL) {
|
||||
else if ((infp = fopen(argv[i], "rb")) == NULL) {
|
||||
yyerror("%s: can't read `%s'\n", argv[0], argv[i]);
|
||||
exit(1);
|
||||
}
|
||||
} else if (outfp == NULL) {
|
||||
if (strcmp(argv[i], "-") == 0)
|
||||
outfp = stdout;
|
||||
if ((outfp = fopen(argv[i], "w")) == NULL) {
|
||||
if ((outfp = fopen(argv[i], "wb")) == NULL) {
|
||||
yyerror("%s: can't write `%s'\n", argv[0], argv[i]);
|
||||
exit(1);
|
||||
}
|
||||
|
@@ -261,8 +261,7 @@ static void LoadSourceFile( const char *filename ) {
|
||||
length = filelength( f );
|
||||
sourceFile = malloc( length + 1 );
|
||||
if ( sourceFile ) {
|
||||
size_t size;
|
||||
size = fread( sourceFile, length, 1, f );
|
||||
fread( sourceFile, length, 1, f );
|
||||
sourceFile[length] = 0;
|
||||
}
|
||||
|
||||
|
@@ -577,6 +577,7 @@ extern Tree cnsttree(Type, ...);
|
||||
extern Tree consttree(unsigned int, Type);
|
||||
extern Tree eqtree(int, Tree, Tree);
|
||||
extern int iscallb(Tree);
|
||||
extern int isnullptr(Tree);
|
||||
extern Tree shtree(int, Tree, Tree);
|
||||
extern void typeerror(int, Tree, Tree);
|
||||
|
||||
@@ -644,7 +645,7 @@ extern int process(char *);
|
||||
extern int findfunc(char *, char *);
|
||||
extern int findcount(char *, int, int);
|
||||
|
||||
extern Tree constexpr(int);
|
||||
extern Tree constantexpr(int);
|
||||
extern int intexpr(int, int);
|
||||
extern Tree simplify(int, Type, Tree, Tree);
|
||||
extern int ispow2(unsigned long u);
|
||||
|
@@ -5,7 +5,6 @@ static Tree addtree(int, Tree, Tree);
|
||||
static Tree andtree(int, Tree, Tree);
|
||||
static Tree cmptree(int, Tree, Tree);
|
||||
static int compatible(Type, Type);
|
||||
static int isnullptr(Tree e);
|
||||
static Tree multree(int, Tree, Tree);
|
||||
static Tree subtree(int, Tree, Tree);
|
||||
#define isvoidptr(ty) \
|
||||
@@ -220,7 +219,7 @@ static int compatible(Type ty1, Type ty2) {
|
||||
&& isptr(ty2) && !isfunc(ty2->type)
|
||||
&& eqtype(unqual(ty1->type), unqual(ty2->type), 0);
|
||||
}
|
||||
static int isnullptr(Tree e) {
|
||||
int isnullptr(Tree e) {
|
||||
Type ty = unqual(e->type);
|
||||
|
||||
return generic(e->op) == CNST
|
||||
@@ -402,7 +401,7 @@ Tree addrof(Tree p) {
|
||||
Symbol t1 = q->u.sym;
|
||||
q->u.sym = 0;
|
||||
q = idtree(t1);
|
||||
/* fall thru */
|
||||
/* fall through */
|
||||
}
|
||||
case INDIR:
|
||||
if (p == q)
|
||||
|
@@ -80,7 +80,7 @@ int fatal(const char *name, const char *fmt, int n) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* printtoken - print current token preceeded by a space */
|
||||
/* printtoken - print current token preceded by a space */
|
||||
static void printtoken(void) {
|
||||
switch (t) {
|
||||
case ID: fprint(stderr, " `%s'", token); break;
|
||||
|
@@ -621,7 +621,7 @@ Tree cast(Tree p, Type type) {
|
||||
p = simplify(CVP, dst, p, NULL);
|
||||
else {
|
||||
if ((isfunc(src->type) && !isfunc(dst->type))
|
||||
|| (!isfunc(src->type) && isfunc(dst->type)))
|
||||
|| (!isnullptr(p) && !isfunc(src->type) && isfunc(dst->type)))
|
||||
warning("conversion from `%t' to `%t' is compiler dependent\n", p->type, type);
|
||||
|
||||
if (src->size != dst->size)
|
||||
|
@@ -292,7 +292,7 @@ static void dumptree(Node p) {
|
||||
dumptree(p->kids[0]);
|
||||
break;
|
||||
}
|
||||
/* else fall thru */
|
||||
/* else fall through */
|
||||
case EQ: case NE: case GT: case GE: case LE: case LT:
|
||||
case ASGN: case BOR: case BAND: case BXOR: case RSH: case LSH:
|
||||
case ADD: case SUB: case DIV: case MUL: case MOD:
|
||||
|
@@ -40,7 +40,7 @@ static int genconst(Tree e, int def) {
|
||||
if (isarith(e->type))
|
||||
error("cast from `%t' to `%t' is illegal in constant expressions\n",
|
||||
e->kids[0]->type, e->type);
|
||||
/* fall thru */
|
||||
/* fall through */
|
||||
case CVI: case CVU: case CVF:
|
||||
e = e->kids[0];
|
||||
continue;
|
||||
@@ -192,7 +192,7 @@ static int initstruct(int len, Type ty, int lev) {
|
||||
return n;
|
||||
}
|
||||
|
||||
/* initializer - constexpr | { constexpr ( , constexpr )* [ , ] } */
|
||||
/* initializer - constantexpr | { constantexpr ( , constantexpr )* [ , ] } */
|
||||
Type initializer(Type ty, int lev) {
|
||||
int n = 0;
|
||||
Tree e;
|
||||
|
@@ -33,7 +33,7 @@ int length(List list) {
|
||||
return n;
|
||||
}
|
||||
|
||||
/* ltov - convert list to an NULL-terminated vector allocated in arena */
|
||||
/* ltov - convert list to a NULL-terminated vector allocated in arena */
|
||||
void *ltov(List *list, unsigned arena) {
|
||||
int i = 0;
|
||||
void **array = newarray(length(*list) + 1, sizeof array[0], arena);
|
||||
|
@@ -182,7 +182,7 @@ static int subi(long x, long y, long min, long max, int needconst) {
|
||||
static int subd(double x, double y, double min, double max, int needconst) {
|
||||
return addd(x, -y, min, max, needconst);
|
||||
}
|
||||
Tree constexpr(int tok) {
|
||||
Tree constantexpr(int tok) {
|
||||
Tree p;
|
||||
|
||||
needconst++;
|
||||
@@ -192,7 +192,7 @@ Tree constexpr(int tok) {
|
||||
}
|
||||
|
||||
int intexpr(int tok, int n) {
|
||||
Tree p = constexpr(tok);
|
||||
Tree p = constantexpr(tok);
|
||||
|
||||
needconst++;
|
||||
if (p->op == CNST+I || p->op == CNST+U)
|
||||
|
@@ -119,7 +119,7 @@ void statement(int loop, Swtch swp, int lev) {
|
||||
static char stop[] = { IF, ID, 0 };
|
||||
Tree p;
|
||||
t = gettok();
|
||||
p = constexpr(0);
|
||||
p = constantexpr(0);
|
||||
if (generic(p->op) == CNST && isint(p->type)) {
|
||||
if (swp) {
|
||||
needconst++;
|
||||
|
@@ -86,7 +86,7 @@ static Tree root1(Tree p) {
|
||||
warning("reference to `%t' elided\n", p->type);
|
||||
if (isptr(p->kids[0]->type) && isvolatile(p->kids[0]->type->type))
|
||||
warning("reference to `volatile %t' elided\n", p->type);
|
||||
/* fall thru */
|
||||
/* fall through */
|
||||
case CVI: case CVF: case CVU: case CVP:
|
||||
case NEG: case BCOM: case FIELD:
|
||||
if (warn++ == 0)
|
||||
|
@@ -76,21 +76,17 @@ void UI_StartDemoLoop( void ) {
|
||||
}
|
||||
|
||||
|
||||
#ifndef MISSIONPACK // bk001206
|
||||
static void NeedCDAction( qboolean result ) {
|
||||
if ( !result ) {
|
||||
trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" );
|
||||
}
|
||||
}
|
||||
#endif // MISSIONPACK
|
||||
|
||||
#ifndef MISSIONPACK // bk001206
|
||||
static void NeedCDKeyAction( qboolean result ) {
|
||||
if ( !result ) {
|
||||
trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" );
|
||||
}
|
||||
}
|
||||
#endif // MISSIONPACK
|
||||
|
||||
char *UI_Argv( int arg ) {
|
||||
static char buffer[MAX_STRING_CHARS];
|
||||
|
@@ -38,10 +38,8 @@ static char *ui_botInfos[MAX_BOTS];
|
||||
static int ui_numArenas;
|
||||
static char *ui_arenaInfos[MAX_ARENAS];
|
||||
|
||||
#ifndef MISSIONPACK // bk001206
|
||||
static int ui_numSinglePlayerArenas;
|
||||
static int ui_numSpecialSinglePlayerArenas;
|
||||
#endif
|
||||
|
||||
/*
|
||||
===============
|
||||
|
@@ -44,11 +44,11 @@ static const char *MonthAbbrev[] = {
|
||||
|
||||
|
||||
static const char *skillLevels[] = {
|
||||
"I Can Win",
|
||||
"Bring It On",
|
||||
"Hurt Me Plenty",
|
||||
"Hardcore",
|
||||
"Nightmare"
|
||||
"Easy",
|
||||
"Normal",
|
||||
"Hard",
|
||||
"Insane",
|
||||
"Lunatic"
|
||||
};
|
||||
|
||||
static const int numSkillLevels = sizeof(skillLevels) / sizeof(const char*);
|
||||
@@ -131,9 +131,7 @@ static char* netnames[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
#ifndef MISSIONPACK // bk001206
|
||||
static char quake3worldMessage[] = "Visit www.openarena.ws - News, Community, Events, Files";
|
||||
#endif
|
||||
static char quake3worldMessage[] = "";
|
||||
|
||||
static int gamecodetoui[] = {4,2,3,0,5,1,6};
|
||||
static int uitogamecode[] = {4,6,2,3,1,5,7};
|
||||
@@ -1018,9 +1016,7 @@ void UI_Load(void) {
|
||||
}
|
||||
|
||||
static const char *handicapValues[] = {"None","95","90","85","80","75","70","65","60","55","50","45","40","35","30","25","20","15","10","5",NULL};
|
||||
#ifndef MISSIONPACK // bk001206
|
||||
static int numHandicaps = sizeof(handicapValues) / sizeof(const char*);
|
||||
#endif
|
||||
|
||||
static void UI_DrawHandicap(rectDef_t *rect, float scale, vec4_t color, int textStyle) {
|
||||
int i, h;
|
||||
@@ -1466,12 +1462,10 @@ static void UI_DrawTierGameType(rectDef_t *rect, float scale, vec4_t color, int
|
||||
}
|
||||
|
||||
|
||||
#ifndef MISSIONPACK // bk001206
|
||||
static const char *UI_OpponentLeaderName(void) {
|
||||
int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName"));
|
||||
return uiInfo.teamList[i].teamMembers[0];
|
||||
}
|
||||
#endif
|
||||
|
||||
static const char *UI_AIFromName(const char *name) {
|
||||
int j;
|
||||
@@ -1483,7 +1477,6 @@ static const char *UI_AIFromName(const char *name) {
|
||||
return "sergei";
|
||||
}
|
||||
|
||||
#ifndef MISSIONPACK // bk001206
|
||||
static const int UI_AIIndex(const char *name) {
|
||||
int j;
|
||||
for (j = 0; j < uiInfo.characterCount; j++) {
|
||||
@@ -1493,9 +1486,7 @@ static const int UI_AIIndex(const char *name) {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef MISSIONPACK // bk001206
|
||||
static const int UI_AIIndexFromName(const char *name) {
|
||||
int j;
|
||||
for (j = 0; j < uiInfo.aliasCount; j++) {
|
||||
@@ -1505,17 +1496,13 @@ static const int UI_AIIndexFromName(const char *name) {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef MISSIONPACK // bk001206
|
||||
static const char *UI_OpponentLeaderHead(void) {
|
||||
const char *leader = UI_OpponentLeaderName();
|
||||
return UI_AIFromName(leader);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef MISSIONPACK // bk001206
|
||||
static const char *UI_OpponentLeaderModel(void) {
|
||||
int i;
|
||||
const char *head = UI_OpponentLeaderHead();
|
||||
@@ -1526,7 +1513,6 @@ static const char *UI_OpponentLeaderModel(void) {
|
||||
}
|
||||
return "sergei";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static qboolean updateOpponentModel = qtrue;
|
||||
@@ -4982,12 +4968,10 @@ static void UI_Pause(qboolean b) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef MISSIONPACK // bk001206
|
||||
static int UI_OwnerDraw_Width(int ownerDraw) {
|
||||
// bk001205 - LCC missing return value
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int UI_PlayCinematic(const char *name, float x, float y, float w, float h) {
|
||||
return trap_CIN_PlayCinematic(name, x, y, w, h, (CIN_loop | CIN_silent));
|
||||
@@ -5973,7 +5957,6 @@ static void UI_StopServerRefresh( void )
|
||||
ArenaServers_MaxPing
|
||||
=================
|
||||
*/
|
||||
#ifndef MISSIONPACK // bk001206
|
||||
static int ArenaServers_MaxPing( void ) {
|
||||
int maxPing;
|
||||
|
||||
@@ -5983,7 +5966,6 @@ static int ArenaServers_MaxPing( void ) {
|
||||
}
|
||||
return maxPing;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@@ -3194,7 +3194,6 @@ static bind_t g_bindings[] =
|
||||
|
||||
static const int g_bindCount = sizeof(g_bindings) / sizeof(bind_t);
|
||||
|
||||
#ifndef MISSIONPACK // bk001206
|
||||
static configcvar_t g_configcvars[] =
|
||||
{
|
||||
{"cl_run", 0, 0},
|
||||
@@ -3207,7 +3206,6 @@ static configcvar_t g_configcvars[] =
|
||||
{"cl_freelook", 0, 0},
|
||||
{NULL, 0, 0}
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
=================
|
||||
@@ -5636,10 +5634,8 @@ displayContextDef_t *Display_GetContext(void) {
|
||||
return DC;
|
||||
}
|
||||
|
||||
#ifndef MISSIONPACK // bk001206
|
||||
static float captureX;
|
||||
static float captureY;
|
||||
#endif
|
||||
|
||||
void *Display_CaptureItem(int x, int y) {
|
||||
int i;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
|
||||
#!/usr/bin/env bash
|
||||
#Tip: You can create a supermake.local file and this script will get the variable from there!
|
||||
BINNAME=openarena
|
||||
MODNAME=oax
|
||||
BINNAME=illusion-arena
|
||||
MODNAME=baseia
|
||||
#ARCH should be either i386 (32 bit) or x86_64 (64 bit)
|
||||
ARCH=i386
|
||||
|
||||
@@ -17,11 +17,11 @@ else
|
||||
fi
|
||||
|
||||
#Create the mod dir
|
||||
mkdir -p ~/.openarena/$MODNAME
|
||||
mkdir -p ~/.illusion/$MODNAME
|
||||
|
||||
|
||||
pushd ..
|
||||
#Build, pak it and start
|
||||
make && cd build/release-linux-$ARCH/baseq3 && zip -r ~/.openarena/$MODNAME/$MODNAME.pk3 vm && $BINNAME +set fs_game $MODNAME +set debug 1 +set sv_pure 0 +vm_ui 2 +vm_game 2 +vm_cgame 2
|
||||
make && cd build/release-linux-$ARCH/baseq3 && zip -r ~/.illusion/$MODNAME/$MODNAME.pk3 vm && $BINNAME +set fs_game $MODNAME +set debug 1 +set sv_pure 0 +vm_ui 2 +vm_game 2 +vm_cgame 2
|
||||
popd
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
|
||||
#!/usr/bin/env bash
|
||||
#Tip: You can create a supermake.local file and this script will get the variable from there!
|
||||
BINNAME=openarena
|
||||
MODNAME=oax
|
||||
BINNAME=illusion-arena
|
||||
MODNAME=baseia
|
||||
#ARCH should be either i386 (32 bit) or x86_64 (64 bit)
|
||||
ARCH=i386
|
||||
|
||||
@@ -17,10 +17,10 @@ else
|
||||
fi
|
||||
|
||||
#Create the mod dir
|
||||
mkdir -p ~/.openarena/$MODNAME
|
||||
mkdir -p ~/.illusion/$MODNAME
|
||||
|
||||
pushd ..
|
||||
#Build, pak it and start
|
||||
make && cd build/release-linux-$ARCH/baseq3 && cp *.so ~/.openarena/$MODNAME/ && $BINNAME +set fs_game $MODNAME +set debug 1 +set sv_pure 0 +vm_ui 0 +vm_game 0 +vm_cgame 0
|
||||
make && cd build/release-linux-$ARCH/baseia && cp *.so ~/.illusion/$MODNAME/ && $BINNAME +set fs_game $MODNAME +set debug 1 +set sv_pure 0 +vm_ui 0 +vm_game 0 +vm_cgame 0
|
||||
popd
|
||||
|
||||
|
40
sprees.dat
40
sprees.dat
@@ -1,20 +1,20 @@
|
||||
//Example spree file
|
||||
|
||||
//Here are the killsprees
|
||||
[kspree]
|
||||
level = 1
|
||||
printpos = 2
|
||||
message = [n] is on a killing spree with [k] kills
|
||||
sound = sound/feedback/excellent.wav
|
||||
|
||||
//Add more kill sprees here (level 2,3,4 etc.)
|
||||
|
||||
//Here comes death sprees. Useful to get people to leave your server
|
||||
//[dspree]
|
||||
//level = 1
|
||||
//printpos = 2
|
||||
//message = [n] keeps on fighting despite [k] deaths
|
||||
//sound = sound/feedback/humiliation.wav
|
||||
|
||||
//Add more death sprees here (level 2,3,4 etc.)
|
||||
|
||||
//Example spree file
|
||||
|
||||
//Here are the killsprees
|
||||
[kspree]
|
||||
level = 1
|
||||
printpos = 2
|
||||
message = [n] is on a killing spree with [k] kills
|
||||
sound = sound/feedback/excellent.wav
|
||||
|
||||
//Add more kill sprees here (level 2,3,4 etc.)
|
||||
|
||||
//Here comes death sprees. Useful to get people to leave your server
|
||||
//[dspree]
|
||||
//level = 1
|
||||
//printpos = 2
|
||||
//message = [n] keeps on fighting despite [k] deaths
|
||||
//sound = sound/feedback/humiliation.wav
|
||||
|
||||
//Add more death sprees here (level 2,3,4 etc.)
|
||||
|
||||
|
@@ -1,28 +1,28 @@
|
||||
-o "../../baseoa/vm/cgame"
|
||||
cg_main
|
||||
..\cg_syscalls
|
||||
cg_challenges
|
||||
cg_consolecmds
|
||||
cg_draw
|
||||
cg_drawtools
|
||||
cg_effects
|
||||
cg_ents
|
||||
cg_event
|
||||
cg_info
|
||||
cg_localents
|
||||
cg_marks
|
||||
cg_players
|
||||
cg_playerstate
|
||||
cg_predict
|
||||
cg_scoreboard
|
||||
cg_servercmds
|
||||
cg_snapshot
|
||||
cg_unlagged
|
||||
cg_view
|
||||
cg_weapons
|
||||
bg_slidemove
|
||||
bg_pmove
|
||||
bg_lib
|
||||
bg_misc
|
||||
q_math
|
||||
q_shared
|
||||
-o "../../baseoa/vm/cgame"
|
||||
cg_main
|
||||
..\cg_syscalls
|
||||
cg_challenges
|
||||
cg_consolecmds
|
||||
cg_draw
|
||||
cg_drawtools
|
||||
cg_effects
|
||||
cg_ents
|
||||
cg_event
|
||||
cg_info
|
||||
cg_localents
|
||||
cg_marks
|
||||
cg_players
|
||||
cg_playerstate
|
||||
cg_predict
|
||||
cg_scoreboard
|
||||
cg_servercmds
|
||||
cg_snapshot
|
||||
cg_unlagged
|
||||
cg_view
|
||||
cg_weapons
|
||||
bg_slidemove
|
||||
bg_pmove
|
||||
bg_lib
|
||||
bg_misc
|
||||
q_math
|
||||
q_shared
|
||||
|
@@ -1,30 +1,30 @@
|
||||
-o "../../missionpack/vm/cgame"
|
||||
cg_main
|
||||
..\cg_syscalls
|
||||
cg_challenges
|
||||
cg_consolecmds
|
||||
cg_newdraw
|
||||
cg_draw
|
||||
cg_drawtools
|
||||
cg_effects
|
||||
cg_ents
|
||||
cg_event
|
||||
cg_info
|
||||
cg_localents
|
||||
cg_marks
|
||||
cg_players
|
||||
cg_playerstate
|
||||
cg_predict
|
||||
cg_scoreboard
|
||||
cg_servercmds
|
||||
cg_snapshot
|
||||
cg_unlagged
|
||||
cg_view
|
||||
cg_weapons
|
||||
bg_slidemove
|
||||
bg_pmove
|
||||
bg_lib
|
||||
bg_misc
|
||||
q_math
|
||||
q_shared
|
||||
ui_shared
|
||||
-o "../../missionpack/vm/cgame"
|
||||
cg_main
|
||||
..\cg_syscalls
|
||||
cg_challenges
|
||||
cg_consolecmds
|
||||
cg_newdraw
|
||||
cg_draw
|
||||
cg_drawtools
|
||||
cg_effects
|
||||
cg_ents
|
||||
cg_event
|
||||
cg_info
|
||||
cg_localents
|
||||
cg_marks
|
||||
cg_players
|
||||
cg_playerstate
|
||||
cg_predict
|
||||
cg_scoreboard
|
||||
cg_servercmds
|
||||
cg_snapshot
|
||||
cg_unlagged
|
||||
cg_view
|
||||
cg_weapons
|
||||
bg_slidemove
|
||||
bg_pmove
|
||||
bg_lib
|
||||
bg_misc
|
||||
q_math
|
||||
q_shared
|
||||
ui_shared
|
||||
|
@@ -1,43 +1,43 @@
|
||||
-o "../../baseoa/vm/qagame.qvm"
|
||||
g_main
|
||||
..\g_syscalls
|
||||
bg_misc
|
||||
bg_lib
|
||||
bg_pmove
|
||||
bg_slidemove
|
||||
q_math
|
||||
q_shared
|
||||
ai_dmnet
|
||||
ai_dmq3
|
||||
ai_team
|
||||
ai_main
|
||||
ai_chat
|
||||
ai_cmd
|
||||
ai_vcmd
|
||||
g_active
|
||||
g_admin
|
||||
g_arenas
|
||||
g_bot
|
||||
g_client
|
||||
g_cmds
|
||||
g_cmds_ext
|
||||
g_combat
|
||||
g_items
|
||||
bg_alloc
|
||||
g_fileops
|
||||
g_killspree
|
||||
g_misc
|
||||
g_missile
|
||||
g_mover
|
||||
g_playerstore
|
||||
g_session
|
||||
g_spawn
|
||||
g_svcmds
|
||||
g_svcmds_ext
|
||||
g_target
|
||||
g_team
|
||||
g_trigger
|
||||
g_unlagged
|
||||
g_utils
|
||||
g_vote
|
||||
g_weapon
|
||||
-o "../../baseoa/vm/qagame.qvm"
|
||||
g_main
|
||||
..\g_syscalls
|
||||
bg_misc
|
||||
bg_lib
|
||||
bg_pmove
|
||||
bg_slidemove
|
||||
q_math
|
||||
q_shared
|
||||
ai_dmnet
|
||||
ai_dmq3
|
||||
ai_team
|
||||
ai_main
|
||||
ai_chat
|
||||
ai_cmd
|
||||
ai_vcmd
|
||||
g_active
|
||||
g_admin
|
||||
g_arenas
|
||||
g_bot
|
||||
g_client
|
||||
g_cmds
|
||||
g_cmds_ext
|
||||
g_combat
|
||||
g_items
|
||||
bg_alloc
|
||||
g_fileops
|
||||
g_killspree
|
||||
g_misc
|
||||
g_missile
|
||||
g_mover
|
||||
g_playerstore
|
||||
g_session
|
||||
g_spawn
|
||||
g_svcmds
|
||||
g_svcmds_ext
|
||||
g_target
|
||||
g_team
|
||||
g_trigger
|
||||
g_unlagged
|
||||
g_utils
|
||||
g_vote
|
||||
g_weapon
|
||||
|
@@ -1,43 +1,43 @@
|
||||
-o "../../missionpack/vm/qagame.qvm"
|
||||
g_main
|
||||
..\g_syscalls
|
||||
bg_misc
|
||||
bg_lib
|
||||
bg_pmove
|
||||
bg_slidemove
|
||||
q_math
|
||||
q_shared
|
||||
ai_dmnet
|
||||
ai_dmq3
|
||||
ai_team
|
||||
ai_main
|
||||
ai_chat
|
||||
ai_cmd
|
||||
ai_vcmd
|
||||
g_active
|
||||
g_admin
|
||||
g_arenas
|
||||
g_bot
|
||||
g_client
|
||||
g_cmds
|
||||
g_cmds_ext
|
||||
g_combat
|
||||
g_items
|
||||
bg_alloc
|
||||
g_fileops
|
||||
g_killspree
|
||||
g_misc
|
||||
g_missile
|
||||
g_mover
|
||||
g_playerstore
|
||||
g_session
|
||||
g_spawn
|
||||
g_svcmds
|
||||
g_svcmds_ext
|
||||
g_target
|
||||
g_team
|
||||
g_trigger
|
||||
g_unlagged
|
||||
g_utils
|
||||
g_vote
|
||||
g_weapon
|
||||
-o "../../missionpack/vm/qagame.qvm"
|
||||
g_main
|
||||
..\g_syscalls
|
||||
bg_misc
|
||||
bg_lib
|
||||
bg_pmove
|
||||
bg_slidemove
|
||||
q_math
|
||||
q_shared
|
||||
ai_dmnet
|
||||
ai_dmq3
|
||||
ai_team
|
||||
ai_main
|
||||
ai_chat
|
||||
ai_cmd
|
||||
ai_vcmd
|
||||
g_active
|
||||
g_admin
|
||||
g_arenas
|
||||
g_bot
|
||||
g_client
|
||||
g_cmds
|
||||
g_cmds_ext
|
||||
g_combat
|
||||
g_items
|
||||
bg_alloc
|
||||
g_fileops
|
||||
g_killspree
|
||||
g_misc
|
||||
g_missile
|
||||
g_mover
|
||||
g_playerstore
|
||||
g_session
|
||||
g_spawn
|
||||
g_svcmds
|
||||
g_svcmds_ext
|
||||
g_target
|
||||
g_team
|
||||
g_trigger
|
||||
g_unlagged
|
||||
g_utils
|
||||
g_vote
|
||||
g_weapon
|
||||
|
Binary file not shown.
@@ -1,53 +1,53 @@
|
||||
-o "../../baseoa/vm/ui"
|
||||
ui_main
|
||||
..\ui_syscalls
|
||||
ui_gameinfo
|
||||
ui_atoms
|
||||
ui_cinematics
|
||||
ui_connect
|
||||
ui_controls2
|
||||
ui_challenges
|
||||
ui_demo2
|
||||
ui_mfield
|
||||
ui_credits
|
||||
ui_menu
|
||||
ui_ingame
|
||||
ui_confirm
|
||||
ui_setup
|
||||
ui_options
|
||||
ui_display
|
||||
ui_firstconnect
|
||||
ui_sound
|
||||
ui_network
|
||||
ui_password
|
||||
ui_playermodel
|
||||
ui_players
|
||||
ui_playersettings
|
||||
ui_preferences
|
||||
ui_qmenu
|
||||
ui_serverinfo
|
||||
ui_servers2
|
||||
ui_sparena
|
||||
ui_specifyserver
|
||||
ui_sppostgame
|
||||
ui_splevel
|
||||
ui_spskill
|
||||
ui_startserver
|
||||
ui_team
|
||||
ui_video
|
||||
ui_addbots
|
||||
ui_removebots
|
||||
ui_teamorders
|
||||
ui_cdkey
|
||||
ui_mods
|
||||
ui_votemenu
|
||||
ui_votemenu_custom
|
||||
ui_votemenu_gametype
|
||||
ui_votemenu_fraglimit
|
||||
ui_votemenu_kick
|
||||
ui_votemenu_map
|
||||
ui_votemenu_timelimit
|
||||
bg_misc
|
||||
bg_lib
|
||||
q_math
|
||||
q_shared
|
||||
-o "../../baseoa/vm/ui"
|
||||
ui_main
|
||||
..\ui_syscalls
|
||||
ui_gameinfo
|
||||
ui_atoms
|
||||
ui_cinematics
|
||||
ui_connect
|
||||
ui_controls2
|
||||
ui_challenges
|
||||
ui_demo2
|
||||
ui_mfield
|
||||
ui_credits
|
||||
ui_menu
|
||||
ui_ingame
|
||||
ui_confirm
|
||||
ui_setup
|
||||
ui_options
|
||||
ui_display
|
||||
ui_firstconnect
|
||||
ui_sound
|
||||
ui_network
|
||||
ui_password
|
||||
ui_playermodel
|
||||
ui_players
|
||||
ui_playersettings
|
||||
ui_preferences
|
||||
ui_qmenu
|
||||
ui_serverinfo
|
||||
ui_servers2
|
||||
ui_sparena
|
||||
ui_specifyserver
|
||||
ui_sppostgame
|
||||
ui_splevel
|
||||
ui_spskill
|
||||
ui_startserver
|
||||
ui_team
|
||||
ui_video
|
||||
ui_addbots
|
||||
ui_removebots
|
||||
ui_teamorders
|
||||
ui_cdkey
|
||||
ui_mods
|
||||
ui_votemenu
|
||||
ui_votemenu_custom
|
||||
ui_votemenu_gametype
|
||||
ui_votemenu_fraglimit
|
||||
ui_votemenu_kick
|
||||
ui_votemenu_map
|
||||
ui_votemenu_timelimit
|
||||
bg_misc
|
||||
bg_lib
|
||||
q_math
|
||||
q_shared
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,11 +1,11 @@
|
||||
-o "../../missionpack/vm/ui"
|
||||
ui_main
|
||||
..\ui_syscalls
|
||||
ui_gameinfo
|
||||
ui_atoms
|
||||
ui_players
|
||||
ui_shared
|
||||
bg_misc
|
||||
bg_lib
|
||||
q_math
|
||||
q_shared
|
||||
-o "../../missionpack/vm/ui"
|
||||
ui_main
|
||||
..\ui_syscalls
|
||||
ui_gameinfo
|
||||
ui_atoms
|
||||
ui_players
|
||||
ui_shared
|
||||
bg_misc
|
||||
bg_lib
|
||||
q_math
|
||||
q_shared
|
||||
|
@@ -1,56 +1,56 @@
|
||||
cd ..
|
||||
mkdir windows
|
||||
mkdir windows\build
|
||||
mkdir windows\baseoa
|
||||
mkdir windows\baseoa\vm
|
||||
mkdir windows\build\cgame
|
||||
copy windows_scripts\lcc.exe windows\build\cgame\
|
||||
copy windows_scripts\q3cpp.exe windows\build\cgame\
|
||||
copy windows_scripts\q3rcc.exe windows\build\cgame\
|
||||
copy windows_scripts\q3asm.exe windows\build\cgame\
|
||||
copy windows_scripts\cgame.q3asm windows\build\
|
||||
|
||||
set LIBRARY=
|
||||
set INCLUDE=
|
||||
|
||||
set cc=lcc -DQ3_VM -S -Wf-target=bytecode -Wf-g -I..\..\..\code\cgame -I..\..\..\code\qcommon %1
|
||||
|
||||
cd windows\build\cgame
|
||||
|
||||
%cc% ../../../code/cgame/cg_challenges.c
|
||||
%cc% ../../../code/cgame/cg_consolecmds.c
|
||||
%cc% ../../../code/cgame/cg_draw.c
|
||||
%cc% ../../../code/cgame/cg_drawtools.c
|
||||
%cc% ../../../code/cgame/cg_effects.c
|
||||
%cc% ../../../code/cgame/cg_ents.c
|
||||
%cc% ../../../code/cgame/cg_event.c
|
||||
%cc% ../../../code/cgame/cg_info.c
|
||||
%cc% ../../../code/cgame/cg_localents.c
|
||||
%cc% ../../../code/cgame/cg_main.c
|
||||
%cc% ../../../code/cgame/cg_marks.c
|
||||
%cc% ../../../code/cgame/cg_newdraw.c
|
||||
%cc% ../../../code/cgame/cg_particles.c
|
||||
%cc% ../../../code/cgame/cg_players.c
|
||||
%cc% ../../../code/cgame/cg_playerstate.c
|
||||
%cc% ../../../code/cgame/cg_predict.c
|
||||
%cc% ../../../code/cgame/cg_scoreboard.c
|
||||
%cc% ../../../code/cgame/cg_servercmds.c
|
||||
%cc% ../../../code/cgame/cg_snapshot.c
|
||||
%cc% ../../../code/cgame/cg_unlagged.c
|
||||
%cc% ../../../code/cgame/cg_view.c
|
||||
%cc% ../../../code/cgame/cg_weapons.c
|
||||
|
||||
%cc% ../../../code/game/bg_lib.c
|
||||
%cc% ../../../code/game/bg_misc.c
|
||||
%cc% ../../../code/game/bg_pmove.c
|
||||
%cc% ../../../code/game/bg_slidemove.c
|
||||
|
||||
copy ..\..\..\code\cgame\cg_syscalls.asm ..
|
||||
|
||||
%cc% ../../../code/qcommon/q_math.c
|
||||
%cc% ../../../code/qcommon/q_shared.c
|
||||
|
||||
q3asm -f ../cgame
|
||||
|
||||
cd ..\..\..
|
||||
mkdir windows
|
||||
mkdir windows\build
|
||||
mkdir windows\baseoa
|
||||
mkdir windows\baseoa\vm
|
||||
mkdir windows\build\cgame
|
||||
copy windows_scripts\lcc.exe windows\build\cgame\
|
||||
copy windows_scripts\q3cpp.exe windows\build\cgame\
|
||||
copy windows_scripts\q3rcc.exe windows\build\cgame\
|
||||
copy windows_scripts\q3asm.exe windows\build\cgame\
|
||||
copy windows_scripts\cgame.q3asm windows\build\
|
||||
|
||||
set LIBRARY=
|
||||
set INCLUDE=
|
||||
|
||||
set cc=lcc -DQ3_VM -S -Wf-target=bytecode -Wf-g -I..\..\..\code\cgame -I..\..\..\code\qcommon %1
|
||||
|
||||
cd windows\build\cgame
|
||||
|
||||
%cc% ../../../code/cgame/cg_challenges.c
|
||||
%cc% ../../../code/cgame/cg_consolecmds.c
|
||||
%cc% ../../../code/cgame/cg_draw.c
|
||||
%cc% ../../../code/cgame/cg_drawtools.c
|
||||
%cc% ../../../code/cgame/cg_effects.c
|
||||
%cc% ../../../code/cgame/cg_ents.c
|
||||
%cc% ../../../code/cgame/cg_event.c
|
||||
%cc% ../../../code/cgame/cg_info.c
|
||||
%cc% ../../../code/cgame/cg_localents.c
|
||||
%cc% ../../../code/cgame/cg_main.c
|
||||
%cc% ../../../code/cgame/cg_marks.c
|
||||
%cc% ../../../code/cgame/cg_newdraw.c
|
||||
%cc% ../../../code/cgame/cg_particles.c
|
||||
%cc% ../../../code/cgame/cg_players.c
|
||||
%cc% ../../../code/cgame/cg_playerstate.c
|
||||
%cc% ../../../code/cgame/cg_predict.c
|
||||
%cc% ../../../code/cgame/cg_scoreboard.c
|
||||
%cc% ../../../code/cgame/cg_servercmds.c
|
||||
%cc% ../../../code/cgame/cg_snapshot.c
|
||||
%cc% ../../../code/cgame/cg_unlagged.c
|
||||
%cc% ../../../code/cgame/cg_view.c
|
||||
%cc% ../../../code/cgame/cg_weapons.c
|
||||
|
||||
%cc% ../../../code/game/bg_lib.c
|
||||
%cc% ../../../code/game/bg_misc.c
|
||||
%cc% ../../../code/game/bg_pmove.c
|
||||
%cc% ../../../code/game/bg_slidemove.c
|
||||
|
||||
copy ..\..\..\code\cgame\cg_syscalls.asm ..
|
||||
|
||||
%cc% ../../../code/qcommon/q_math.c
|
||||
%cc% ../../../code/qcommon/q_shared.c
|
||||
|
||||
q3asm -f ../cgame
|
||||
|
||||
cd ..\..\..
|
||||
pause
|
||||
|
@@ -1,58 +0,0 @@
|
||||
cd ..
|
||||
mkdir windows
|
||||
mkdir windows\build
|
||||
mkdir windows\missionpack
|
||||
mkdir windows\missionpack\vm
|
||||
mkdir windows\build\cgame
|
||||
copy windows_scripts\lcc.exe windows\build\cgame\
|
||||
copy windows_scripts\q3cpp.exe windows\build\cgame\
|
||||
copy windows_scripts\q3rcc.exe windows\build\cgame\
|
||||
copy windows_scripts\q3asm.exe windows\build\cgame\
|
||||
copy windows_scripts\cgame_mp.q3asm windows\build\cgame.q3asm
|
||||
|
||||
set LIBRARY=
|
||||
set INCLUDE=
|
||||
|
||||
set cc=lcc -DMISSIONPACK -DQ3_VM -S -Wf-target=bytecode -Wf-g -I..\..\..\code\cgame -I..\..\..\code\ui -I..\..\..\code\qcommon %1
|
||||
|
||||
cd windows\build\cgame
|
||||
|
||||
%cc% ../../../code/cgame/cg_challenges.c
|
||||
%cc% ../../../code/cgame/cg_consolecmds.c
|
||||
%cc% ../../../code/cgame/cg_draw.c
|
||||
%cc% ../../../code/cgame/cg_drawtools.c
|
||||
%cc% ../../../code/cgame/cg_effects.c
|
||||
%cc% ../../../code/cgame/cg_ents.c
|
||||
%cc% ../../../code/cgame/cg_event.c
|
||||
%cc% ../../../code/cgame/cg_info.c
|
||||
%cc% ../../../code/cgame/cg_localents.c
|
||||
%cc% ../../../code/cgame/cg_main.c
|
||||
%cc% ../../../code/cgame/cg_marks.c
|
||||
%cc% ../../../code/cgame/cg_newdraw.c
|
||||
%cc% ../../../code/cgame/cg_particles.c
|
||||
%cc% ../../../code/cgame/cg_players.c
|
||||
%cc% ../../../code/cgame/cg_playerstate.c
|
||||
%cc% ../../../code/cgame/cg_predict.c
|
||||
%cc% ../../../code/cgame/cg_scoreboard.c
|
||||
%cc% ../../../code/cgame/cg_servercmds.c
|
||||
%cc% ../../../code/cgame/cg_snapshot.c
|
||||
%cc% ../../../code/cgame/cg_unlagged.c
|
||||
%cc% ../../../code/cgame/cg_view.c
|
||||
%cc% ../../../code/cgame/cg_weapons.c
|
||||
|
||||
%cc% ../../../code/game/bg_lib.c
|
||||
%cc% ../../../code/game/bg_misc.c
|
||||
%cc% ../../../code/game/bg_pmove.c
|
||||
%cc% ../../../code/game/bg_slidemove.c
|
||||
|
||||
copy ..\..\..\code\cgame\cg_syscalls.asm ..
|
||||
|
||||
%cc% ../../../code/qcommon/q_math.c
|
||||
%cc% ../../../code/qcommon/q_shared.c
|
||||
|
||||
%cc% ../../../code/ui/ui_shared.c
|
||||
|
||||
q3asm -f ../cgame
|
||||
|
||||
cd ..\..\..
|
||||
pause
|
@@ -1,69 +1,69 @@
|
||||
cd ..
|
||||
mkdir windows
|
||||
mkdir windows\build
|
||||
mkdir windows\baseoa
|
||||
mkdir windows\baseoa\vm
|
||||
mkdir windows\build\game
|
||||
copy windows_scripts\lcc.exe windows\build\game\
|
||||
copy windows_scripts\q3cpp.exe windows\build\game\
|
||||
copy windows_scripts\q3rcc.exe windows\build\game\
|
||||
copy windows_scripts\q3asm.exe windows\build\game\
|
||||
copy windows_scripts\game.q3asm windows\build\
|
||||
|
||||
set LIBRARY=
|
||||
set INCLUDE=
|
||||
|
||||
set cc=lcc -DQ3_VM -S -Wf-target=bytecode -Wf-g -I..\..\..\code\game -I..\..\..\code\qcommon %1
|
||||
|
||||
cd windows\build\game
|
||||
|
||||
%cc% ../../../code/game/ai_chat.c
|
||||
%cc% ../../../code/game/ai_cmd.c
|
||||
%cc% ../../../code/game/ai_dmnet.c
|
||||
%cc% ../../../code/game/ai_dmq3.c
|
||||
%cc% ../../../code/game/ai_main.c
|
||||
%cc% ../../../code/game/ai_team.c
|
||||
%cc% ../../../code/game/ai_vcmd.c
|
||||
%cc% ../../../code/game/bg_lib.c
|
||||
%cc% ../../../code/game/bg_misc.c
|
||||
%cc% ../../../code/game/bg_pmove.c
|
||||
%cc% ../../../code/game/bg_slidemove.c
|
||||
%cc% ../../../code/game/g_active.c
|
||||
%cc% ../../../code/game/g_admin.c
|
||||
%cc% ../../../code/game/g_arenas.c
|
||||
%cc% ../../../code/game/g_bot.c
|
||||
%cc% ../../../code/game/g_client.c
|
||||
%cc% ../../../code/game/g_cmds.c
|
||||
%cc% ../../../code/game/g_cmds_ext.c
|
||||
%cc% ../../../code/game/g_combat.c
|
||||
%cc% ../../../code/game/g_items.c
|
||||
%cc% ../../../code/game/g_main.c
|
||||
%cc% ../../../code/game/bg_alloc.c
|
||||
%cc% ../../../code/game/g_fileops.c
|
||||
%cc% ../../../code/game/g_killspree.c
|
||||
%cc% ../../../code/game/g_misc.c
|
||||
%cc% ../../../code/game/g_missile.c
|
||||
%cc% ../../../code/game/g_mover.c
|
||||
%cc% ../../../code/game/g_playerstore.c
|
||||
rem %cc% ../../../code/game/g_rankings.c
|
||||
%cc% ../../../code/game/g_session.c
|
||||
%cc% ../../../code/game/g_spawn.c
|
||||
%cc% ../../../code/game/g_svcmds.c
|
||||
%cc% ../../../code/game/g_svcmds_ext.c
|
||||
rem %cc% ../../../code/game/g_syscalls.c
|
||||
copy ..\..\..\code\game\g_syscalls.asm ..
|
||||
%cc% ../../../code/game/g_target.c
|
||||
%cc% ../../../code/game/g_team.c
|
||||
%cc% ../../../code/game/g_trigger.c
|
||||
%cc% ../../../code/game/g_unlagged.c
|
||||
%cc% ../../../code/game/g_utils.c
|
||||
%cc% ../../../code/game/g_vote.c
|
||||
%cc% ../../../code/game/g_weapon.c
|
||||
|
||||
%cc% ../../../code/qcommon/q_math.c
|
||||
%cc% ../../../code/qcommon/q_shared.c
|
||||
|
||||
q3asm -f ../game
|
||||
|
||||
cd ..\..\..
|
||||
mkdir windows
|
||||
mkdir windows\build
|
||||
mkdir windows\baseoa
|
||||
mkdir windows\baseoa\vm
|
||||
mkdir windows\build\game
|
||||
copy windows_scripts\lcc.exe windows\build\game\
|
||||
copy windows_scripts\q3cpp.exe windows\build\game\
|
||||
copy windows_scripts\q3rcc.exe windows\build\game\
|
||||
copy windows_scripts\q3asm.exe windows\build\game\
|
||||
copy windows_scripts\game.q3asm windows\build\
|
||||
|
||||
set LIBRARY=
|
||||
set INCLUDE=
|
||||
|
||||
set cc=lcc -DQ3_VM -S -Wf-target=bytecode -Wf-g -I..\..\..\code\game -I..\..\..\code\qcommon %1
|
||||
|
||||
cd windows\build\game
|
||||
|
||||
%cc% ../../../code/game/ai_chat.c
|
||||
%cc% ../../../code/game/ai_cmd.c
|
||||
%cc% ../../../code/game/ai_dmnet.c
|
||||
%cc% ../../../code/game/ai_dmq3.c
|
||||
%cc% ../../../code/game/ai_main.c
|
||||
%cc% ../../../code/game/ai_team.c
|
||||
%cc% ../../../code/game/ai_vcmd.c
|
||||
%cc% ../../../code/game/bg_lib.c
|
||||
%cc% ../../../code/game/bg_misc.c
|
||||
%cc% ../../../code/game/bg_pmove.c
|
||||
%cc% ../../../code/game/bg_slidemove.c
|
||||
%cc% ../../../code/game/g_active.c
|
||||
%cc% ../../../code/game/g_admin.c
|
||||
%cc% ../../../code/game/g_arenas.c
|
||||
%cc% ../../../code/game/g_bot.c
|
||||
%cc% ../../../code/game/g_client.c
|
||||
%cc% ../../../code/game/g_cmds.c
|
||||
%cc% ../../../code/game/g_cmds_ext.c
|
||||
%cc% ../../../code/game/g_combat.c
|
||||
%cc% ../../../code/game/g_items.c
|
||||
%cc% ../../../code/game/g_main.c
|
||||
%cc% ../../../code/game/bg_alloc.c
|
||||
%cc% ../../../code/game/g_fileops.c
|
||||
%cc% ../../../code/game/g_killspree.c
|
||||
%cc% ../../../code/game/g_misc.c
|
||||
%cc% ../../../code/game/g_missile.c
|
||||
%cc% ../../../code/game/g_mover.c
|
||||
%cc% ../../../code/game/g_playerstore.c
|
||||
rem %cc% ../../../code/game/g_rankings.c
|
||||
%cc% ../../../code/game/g_session.c
|
||||
%cc% ../../../code/game/g_spawn.c
|
||||
%cc% ../../../code/game/g_svcmds.c
|
||||
%cc% ../../../code/game/g_svcmds_ext.c
|
||||
rem %cc% ../../../code/game/g_syscalls.c
|
||||
copy ..\..\..\code\game\g_syscalls.asm ..
|
||||
%cc% ../../../code/game/g_target.c
|
||||
%cc% ../../../code/game/g_team.c
|
||||
%cc% ../../../code/game/g_trigger.c
|
||||
%cc% ../../../code/game/g_unlagged.c
|
||||
%cc% ../../../code/game/g_utils.c
|
||||
%cc% ../../../code/game/g_vote.c
|
||||
%cc% ../../../code/game/g_weapon.c
|
||||
|
||||
%cc% ../../../code/qcommon/q_math.c
|
||||
%cc% ../../../code/qcommon/q_shared.c
|
||||
|
||||
q3asm -f ../game
|
||||
|
||||
cd ..\..\..
|
||||
pause
|
||||
|
@@ -1,69 +0,0 @@
|
||||
cd ..
|
||||
mkdir windows
|
||||
mkdir windows\build
|
||||
mkdir windows\missionpack
|
||||
mkdir windows\missionpack\vm
|
||||
mkdir windows\build\game
|
||||
copy windows_scripts\lcc.exe windows\build\game\
|
||||
copy windows_scripts\q3cpp.exe windows\build\game\
|
||||
copy windows_scripts\q3rcc.exe windows\build\game\
|
||||
copy windows_scripts\q3asm.exe windows\build\game\
|
||||
copy windows_scripts\game_mp.q3asm windows\build\game.q3asm
|
||||
|
||||
set LIBRARY=
|
||||
set INCLUDE=
|
||||
|
||||
set cc=lcc -DQ3_VM -DMISSIONPACK -S -Wf-target=bytecode -Wf-g -I..\..\..\code\game -I..\..\..\code\qcommon %1
|
||||
|
||||
cd windows\build\game
|
||||
|
||||
%cc% ../../../code/game/ai_chat.c
|
||||
%cc% ../../../code/game/ai_cmd.c
|
||||
%cc% ../../../code/game/ai_dmnet.c
|
||||
%cc% ../../../code/game/ai_dmq3.c
|
||||
%cc% ../../../code/game/ai_main.c
|
||||
%cc% ../../../code/game/ai_team.c
|
||||
%cc% ../../../code/game/ai_vcmd.c
|
||||
%cc% ../../../code/game/bg_lib.c
|
||||
%cc% ../../../code/game/bg_misc.c
|
||||
%cc% ../../../code/game/bg_pmove.c
|
||||
%cc% ../../../code/game/bg_slidemove.c
|
||||
%cc% ../../../code/game/g_active.c
|
||||
%cc% ../../../code/game/g_admin.c
|
||||
%cc% ../../../code/game/g_arenas.c
|
||||
%cc% ../../../code/game/g_bot.c
|
||||
%cc% ../../../code/game/g_client.c
|
||||
%cc% ../../../code/game/g_cmds.c
|
||||
%cc% ../../../code/game/g_cmds_ext.c
|
||||
%cc% ../../../code/game/g_combat.c
|
||||
%cc% ../../../code/game/g_items.c
|
||||
%cc% ../../../code/game/g_main.c
|
||||
%cc% ../../../code/game/bg_alloc.c
|
||||
%cc% ../../../code/game/g_fileops.c
|
||||
%cc% ../../../code/game/g_killspree.c
|
||||
%cc% ../../../code/game/g_misc.c
|
||||
%cc% ../../../code/game/g_missile.c
|
||||
%cc% ../../../code/game/g_mover.c
|
||||
%cc% ../../../code/game/g_playerstore.c
|
||||
rem %cc% ../../../code/game/g_rankings.c
|
||||
%cc% ../../../code/game/g_session.c
|
||||
%cc% ../../../code/game/g_spawn.c
|
||||
%cc% ../../../code/game/g_svcmds.c
|
||||
%cc% ../../../code/game/g_svcmds_ext.c
|
||||
rem %cc% ../../../code/game/g_syscalls.c
|
||||
copy ..\..\..\code\game\g_syscalls.asm ..
|
||||
%cc% ../../../code/game/g_target.c
|
||||
%cc% ../../../code/game/g_team.c
|
||||
%cc% ../../../code/game/g_trigger.c
|
||||
%cc% ../../../code/game/g_unlagged.c
|
||||
%cc% ../../../code/game/g_utils.c
|
||||
%cc% ../../../code/game/g_vote.c
|
||||
%cc% ../../../code/game/g_weapon.c
|
||||
|
||||
%cc% ../../../code/qcommon/q_math.c
|
||||
%cc% ../../../code/qcommon/q_shared.c
|
||||
|
||||
q3asm -f ../game
|
||||
|
||||
cd ..\..\..
|
||||
pause
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user