as released 1999-03-14

This commit is contained in:
archive 1999-03-14 00:00:00 +00:00
parent 5004fddb4e
commit bccddaa7fd
20 changed files with 3207 additions and 2561 deletions

91
CHANGES
View file

@ -1,3 +1,94 @@
CHANGES FROM ACTION 1.5 TO ACTION 1.51
o Now remembers how many times reload key was pressed.
o Shotgun reduced to Action Quake 1.0c levels beyond distance of 450.
o Bandolier/weapon-dropping bug fixed.
o Empty pistols animation setup improved.
o Firing sequence for dual pistols fixed (firing was simultaneously
before).
o Various grenade-related fixes.
o Knife slashing damage changed (should be more damaging now).
o You can now switch weapons while bandaging again.
o Leg damage (from falling) no longer taken while in god mode.
o Spelling of "trepanned" fixed.
o Item spawning problem that affected some old/odd maps fixed.
o Reloading sound/speed issues fixed.
o Point-blank knife-throwing bug fixed.
o Blood trail fixes.
o Death sound fixes.
o Negative value for "tgren" server variable is treated as 0 now.
o New server variable "skipmotd" allows you to leave out the standard
Action MOTD contents (except the two lines at the top), for people who
want really big local motd.txt files.
o Many server variables that didn't need to be SERVERINFO (ie: appearing
in GameSpy, etc) are no longer SERVERINFO.
o New server command "sv reloadmotd" allows you to reload the MOTD from
disk. Also, the MOTD is always reloaded at the end of each level.
o The "playerlist" and "players" commands no longer contain frags when
"noscore" is turned on.
o New "ininame" variable lets you change the name of your Action INI file
from "action.ini" to something else. Useful for people who run multiple
servers from the same directory tree.
o Deathmatch mode is now forced on always, as in previous versions of
Action. This was the cause of the "failed to find special item spawn
point" error when starting a game locally on your computer.
o Delayed kill attribution for falling damage fixes.
o Lasersight properly follows M4 during ride-up.
o Scoreboard cosmetic fixes.
o Players entering the game in a teamplay game no longer generate the "enter
game" teleport effect (green flash, etc) at a spawn point.
o Bug fixed that could cause crash when certain weird combinations of dmflags
were used (ie teams-by-skin with teamplay turned on).
o Players can now select "classic" style firing where shots land slightly
right or left (depending on your handedness) and down from the crosshair
(see the "hand" command in the README for info).
o The [DEAD] flag on a dead chatter's name previously didn't get tacked on
starting at the right time, so sometimes you'd see someone who appeared to
be alive (due to no [DEAD] on their name) say something but %-variables
(ie %W, %H, etc) didn't get expanded. This also caused dead people's
messages to be able to reach teammates sometimes in the moments after
dying.
o After a team round has ended, all players (including players who
survived) can now see the scoreboard as if they were dead, to see who else
survived the round.
o The join-a-team menu now, if both teams have the same number of players,
defaults to the team that's losing (instead of defaulting to the first
team).
o Optimization in SetIDView and DetermineViewedTeammate suggested by
hal[9k].
CHANGES FROM ACTION 1.1b2 TO ACTION 1.5

91
LICENSE.TXT Normal file
View file

@ -0,0 +1,91 @@
LIMITED PROGRAM SOURCE CODE LICENSE
This Limited Program Source Code License (the "Agreement") is between Id Software, Inc., a Texas corporation, (hereinafter "Id Software") and Licensee (as defined below) and is made effective beginning on the date you, the Licensee, download the Code, as defined below, (the "Effective Date"). BY DOWNLOADING THE CODE, AS DEFINED BELOW, YOU, THE LICENSEE, AGREE TO ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT. YOU SHOULD READ THIS AGREEMENT CAREFULLY BEFORE DOWNLOADING THE CODE. EVERY PERSON IN POSSESSION OF AN AUTHORIZED COPY, AS DEFINED BELOW, OF THE CODE SHALL BE SUBJECT TO THE TERMS AND CONDITIONS OF THIS AGREEMENT.
R E C I T A L S
WHEREAS, Id Software is the owner and developer of the computer software program source code accompanied by this Agreement (the "Code");
WHEREAS, Id Software desires to license certain limited non-exclusive rights regarding the Code to Licensee; and
WHEREAS, Licensee desires to receive a limited license for such rights.
T E R M S A N D C O N D I T I O N S
NOW, THEREFORE, for and in consideration of the mutual premises contained herein and for other good and valuable consideration, the receipt and sufficiency of which is hereby acknowledged, the undersigned parties do hereby agree as follows:
1. Definitions. The parties hereto agree the following definitions shall apply to this Agreement:
a. "Authorized Copy" shall mean a copy of the Code obtained by Authorized Means, as defined below. A copy of the Code is not an "Authorized Copy" unless it is accompanied by a copy of this Agreement and obtained by Authorized Means. A Modified Copy, as defined below, is not an Authorized Copy;
b. "Authorized Means" shall mean obtaining an Authorized Copy only by downloading the Authorized Copy from Id Software's Internet web site or from another web site authorized or approved by Id Software for such purposes or by obtaining an Authorized Copy by electronic means via the Internet;
c. "Code" shall mean the computer software program source code which accompanies this Agreement and includes Code included within any Modified Copy and which is the code that constitutes the Authorized Copy;
d. "Game" shall mean QUAKE II;
e. "Licensee" shall mean you, the person who is in possession of an Authorized Copy by Authorized Means; and
f. "Modified Copy" shall mean a copy of the Code first obtained by Authorized Means which is subsequently modified by Licensee, as provided in paragraph 2. below.
2. Grant of Rights. Subject to the terms and provisions of this Agreement, Id Software hereby grants to Licensee and Licensee hereby accepts, a limited, world-wide (except as otherwise provided herein), non-exclusive, non-transferable, and non-assignable license to: (i) use the Authorized Copy and the Modified Copy, as defined above, for the development by Licensee of extra levels operable with the Game (the "Extra Levels"); (ii) incorporate all or a portion of the Authorized Copy and the Modified Copy within the Extra Levels; (iii) distribute by way of a sublicense limited by the terms of this Agreement, free of charge and at no cost, the Authorized Copy and the Modified Copy to the extent such Modified Copy and such Authorized Copy, or a portion thereof, is included within the Extra Levels; (iv) distribute by way of a sublicense limited by the terms of this Agreement, free of charge and at no cost, by electronic transmission via the Internet only the Authorized Copy without any alteration or modification along with a copy of this Agreement which must always accompany the Authorized Copy; (v) modify the Authorized Copy in order to create a Modified Copy, as defined above; and (vi) distribute the Modified Copy by way of a sublicense limited by the terms of this Agreement, free of charge and at no cost, by electronic transmission via the Internet only. Each person or entity who/which receives a copy of the Code shall be subject to the terms of this Agreement but, no rights are granted to any person or entity who/which obtains, receives, or is in possession of any copy of the Code by other than Authorized Means.
3. Reservation of Rights and Prohibitions. Id Software expressly reserves all rights not granted herein. Licensee shall not make any use of the trademarks relating to the Game or Id Software (the "Trademarks"). Any use by Licensee of the Authorized Copy or the Modified Copy not expressly permitted in paragraph 2. above is expressly prohibited and any such unauthorized use shall constitute a material breach of this Agreement by Licensee. Any use of the Code, whether included within a Modified Copy or otherwise, and/or the Authorized Copy not permitted in this Agreement shall constitute an infringement or violation of Id Software's copyright in the Code. Licensee shall not copy, reproduce, manufacture or distribute (free of charge or otherwise) the Authorized Copy or the Modified Copy in any tangible media, including, without limitation, a CD ROM. Licensee shall not commercially exploit by sale, lease, rental or otherwise the Authorized Copy or the Modified Copy whether included within Extra Levels or otherwise. Licensee shall not commercially exploit by sale, lease, rental or otherwise any Extra Levels developed by the use of the Code, whether in whole or in part. Licensee is not receiving any rights hereunder regarding the Game, the Trademarks or any audio-visual elements, artwork, sound, music, images, characters, or other element of the Game. Licensee may modify the Authorized Copy in order to create a Modified Copy, as noted above, but all sublicensees who receive the Modified Copy shall not receive any rights to commercially exploit or to make any other use of the Code included therein except the right to use such Code for such sublicensee's personal entertainment. By way of example and not exclusion, a sublicensee for the Modified Copy shall not further modify the Code within the Modified Copy. Only the Licensee who obtains the Code by Authorized Means shall be permitted to modify such Code on the terms as described in this Agreement.
4. Additional Obligations. In addition to the obligations of Licensee otherwise set forth in this Agreement, during the Term, and thereafter where specified, Licensee agrees that:
a. Licensee will not attack or challenge the ownership by Id Software of the Code, the Authorized Copy, the Game, the Trademarks, or any copyright, patent or trademark or other intellectual property right related thereto and Licensee will not attack or challenge the validity of the license granted hereunder during the Term or thereafter; and
b. Licensee will promptly inform Id Software of any unauthorized use of the Code, the Authorized Copy, the Trademarks, or the Game, or any portions thereof, and will reasonably assist Id Software in the enforcement of all rights Id Software may have against such unauthorized users.
5. Ownership. Title to and all ownership rights in and to the Code, whether included within the Modified Copy, the Authorized Copy or otherwise, the Game, the Authorized Copy, and the Trademarks and the copyrights, trade secrets, trademarks, patents and all other intellectual property rights related thereto shall remain with Id Software which shall have the exclusive right to protect the same by copyright or otherwise. Licensee shall have no ownership rights in or to the Game, the Code, the Authorized Copy or the Trademarks. Licensee acknowledges that Licensee, by this Agreement, is only receiving a limited license to use the Authorized Copy, as specified in paragraph 2. of this Agreement.
6. Compliance with Applicable Laws. In exercising Licensee's limited rights hereunder, Licensee shall comply with all applicable laws, [including, without limitation, 22 U.S.C., section 2778 and 22 U.S.C. C.F.R. Parts 120-130 (1995)] regulations, ordinances and statutes, including, but not limited to, the import/export laws and regulations of the United States and its governmental and regulatory agencies (including, without limitation, the Bureau of Export Administration and the U.S. Department of Commerce) and all applicable international treaties and laws.
7. Term and Termination.
a. The term of this Agreement and the license granted herein begins on the Effective Date and shall expire, without notice, on a date one (1) calendar year from the Effective Date (the "Term").
b. Either party may terminate this Agreement, for any reason or no reason, on thirty (30) days written notice to the other party. Termination will be effective on the thirtieth (30th) day following delivery of the notice of termination. Notwithstanding anything to the contrary herein, this Agreement shall immediately terminate, without the requirement of any notice from Id Software to Licensee, upon the occurrence of any of the following "Terminating Events": (i) if Licensee files a petition in bankruptcy; (ii) if Licensee makes an assignment for the benefit of creditors; (iii) if any bankruptcy proceeding or assignment for benefit of creditors is commenced against Licensee and not dismissed within sixty (60) days after the date of its commencement; (iv) the insolvency of Licensee; or (v) a breach, whether material or otherwise, of this Agreement by Licensee. Upon the occurrence of a Terminating Event, this Agreement and any and all rights hereunder shall terminate without prejudice to any rights or claims Id Software may have, and all rights granted hereunder shall revert, without notice, to and be vested in Id Software.
c. Termination or expiration of this Agreement shall not create any liability against Id Software and shall not relieve Licensee from any liability which arises prior to termination or expiration. Upon expiration or earlier termination of this Agreement, Licensee shall have no further right to exercise the rights licensed hereunder or otherwise acquired in relation to this Agreement.
8. Licensee's Warranties. Licensee warrants and represents that: (i) Licensee has full legal rights and authority to enter into and become bound by the terms of this Agreement; (ii) Licensee has full legal rights and authority to perform Licensee?s obligations hereunder; (iii) Licensee will comply, at all times during the Term, with all applicable laws, as set forth hereinabove; (iv) all modifications which Licensee performs on the Code in order to create the Modified Copy and all non-Id Software property included within Extra Levels shall not infringe against or misappropriate any third party rights, including, without limitation, copyrights and trade secrets; and (v) the use or non-use of all modifications which Licensee performs on the Code in order to create the Modified Copy and all non-Id Software property included within Extra Levels shall not infringe against or misappropriate any third party rights, including, without limitation, copyrights and trade secrets.
9. Indemnification. Licensee hereby agrees to indemnify, hold harmless and defend Id Software and Id Software's predecessors, successors, assigns, officers, directors, shareholders, employees, agents, representatives, licensees (but not including Licensee), sublicensees, distributors, attorneys and accountants (collectively, the "Id Related Parties") from and against any and all "Claims", which shall mean all damages, claims, losses, causes of action, liabilities, lawsuits, judgments and expenses (including, without limitation, reasonable attorneys' fees and expenses) arising from, relating to or in connection with (i) a breach of this Agreement by Licensee and/or (ii) Licensee's use or non-use of the Code, whether the Authorized Copy or whether a portion of the Code as may be included within the Modified Copy or within Extra Levels. Id Software agrees to notify Licensee of any such Claims within a reasonable time after Id Software learns of same. Licensee, at its own expense, shall defend Id Software and the Id Related Parties from and against any and all Claims. Id Software and the Id Related Parties reserve the right to participate in any defense of the Claims with counsel of their choice, and at their own expense. In the event Licensee fails to provide a defense, then Licensee shall be responsible for paying the attorneys' fees and expenses incurred by Id Software and the Id Related Parties regarding the defense of the Claims. Id Software and the Id Related Parties, as applicable, agree to reasonably assist in the defense of the Claims. No settlement by Licensee of any Claims shall be valid unless Licensee receives the prior written consent of Id Software and the Id Related Parties, as applicable, to any such settlement, with consent may be withheld in Id Software's and the Id Related Parties' sole discretion.
10. Limitation of Liability. UNDER NO CIRCUMSTANCES SHALL ID SOFTWARE BE LIABLE TO LICENSEE FOR ACTUAL, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR PUNITIVE DAMAGES OR ANY OTHER DAMAGES, WHETHER OR NOT ID SOFTWARE RECEIVES NOTICE OF ANY SUCH DAMAGES.
11. Disclaimer of Warranties. ID SOFTWARE EXPRESSLY DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH REGARD TO THE CODE, THE AUTHORIZED COPY AND OTHERWISE.
12. Goodwill. Licensee recognizes the great value of the goodwill associated with the Game and the Trademarks, and acknowledges that such goodwill, now existing and hereafter created, exclusively belongs to Id Software and that the Trademarks have acquired a secondary meaning in the mind of the public.
13. Remedies. In the event of a breach of this Agreement by Id Software, Licensee's sole remedy shall be to terminate this Agreement by delivering written notice of termination to Id Software. In the event of a breach by Licensee of this Agreement, Id Software may pursue the remedies to which Id Software is entitled under applicable law and this Agreement. Licensee agrees that Licensee's unauthorized use of the Authorized Copy would immediately and irreparably damage Id Software, and in the event of such threatened or actual unauthorized use, Id Software shall be entitled to an injunctive order appropriately restraining and/or prohibiting such unauthorized use without the necessity of Id Software posting bond or other security. Pursuit of any remedy by Id Software shall not constitute a waiver of any other right or remedy of Id Software under this Agreement or under applicable law.
14. Choice of Law, Venue and Service of Process. This Agreement shall be construed in accordance with the laws of the State of Texas and applicable United States federal law and all claims and/or lawsuits in connection with this Agreement must be brought in Dallas County, Texas where exclusive venue shall lie. Licensee hereby agrees that service of process by certified mail to the address set forth below, with return receipt requested, shall constitute valid service of process upon Licensee. If for any reason Licensee has moved or cannot be validly served, then Licensee appoints the Secretary of State of the state of Texas to accept service of process on Licensee's behalf.
15. Delivery of Notices. Unless otherwise directed in writing by the parties, all notices given hereunder shall be sent to the last known address of addressee. All notices, requests, consents and other communications under this Agreement shall be in writing and shall be deemed to have been delivered on the date personally delivered or on the date deposited in the United States Postal Service, postage prepaid, by certified mail, return receipt requested, or telegraphed and confirmed, or delivered by electronic facsimile and confirmed. Any notice to Id Software shall also be sent to its counsel: D. Wade Cloud, Jr., Hiersche, Martens, Hayward, Drakeley & Urbach, P.C., 15303 Dallas Parkway, Suite 700, LB 17, Dallas, Texas 75248.
16. No Partnership, Etc. This Agreement does not constitute and shall not be construed as constituting a partnership or joint venture between Id Software and Licensee. Neither party shall have any right to obligate or bind the other party in any manner whatsoever, and nothing herein contained shall give, or is intended to give, any rights of any kind to any third persons.
17. Entire agreement. This Agreement constitutes the entire understanding between Licensee and Id Software regarding the subject matter hereof. Each and every clause of this Agreement is severable from the whole and shall survive unless the entire Agreement is declared unenforceable. No prior or present agreements or representations between the parties hereto regarding the subject matter hereof shall be binding upon the parties hereto unless incorporated in this Agreement. No modification or change in this Agreement shall be valid or binding upon the parties hereto unless in writing and executed by the parties to be bound thereby.
18. Assignment. This Agreement shall bind and inure to the benefit of Id Software, its successors and assigns, and Id Software may assign its rights hereunder, in Id Software's sole discretion. This Agreement is personal to Licensee, and Licensee shall not assign, transfer, convey nor franchise its rights granted hereunder. As provided above, Licensee may sublicense Licensee's limited rights herein by transferring the Authorized Copy by Authorized Means. As noted, each sublicensee in possession of a copy of the Authorized Copy shall be subject to the terms and conditions of this Agreement.
19. Survival. The following provisions shall survive the expiration or earlier termination of this Agreement: paragraphs 5., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 19., 20.a. and 20.b.
20. Miscellaneous.
a. All captions in this Agreement are intended solely for the convenience of the parties, and none shall effect the meaning or construction of any provision.
b. The terms and conditions of this Agreement have been negotiated fully and freely among the parties. Accordingly, the preparation of this Agreement by counsel for a given party will not be material to the construction hereof, and the terms of this Agreement shall not be strictly construed against such party.
BY DOWNLOADING THE CODE, AS DEFINED ABOVE, YOU, THE LICENSEE, AGREE TO ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT.
February 12, 1998
LIMITED PROGRAM SOURCE CODE LICENSE PAGE 1

46
README
View file

@ -1,4 +1,4 @@
SERVER/PLAYER DOCUMENTATION FOR ACTION 1.5
SERVER/PLAYER DOCUMENTATION FOR ACTION 1.51
ACTION-SPECIFIC SERVER VARIABLES
@ -18,6 +18,10 @@ motd_time: the number of seconds that the initial MOTD should remain on the
player's screen. This number is rounded up to the nearest 2-second interval
(default = 2).
skipmotd: allows you to skip all but the top two lines of the normal
Action MOTD, for server operators who want large motd.txt files
(default = 0 [don't skip]).
weapons: the maximum number of "unique weapons" a player can carry (the
bandolier adds 1 to a player's max carry) (default = 1).
@ -59,6 +63,12 @@ nohud: if set to 1, the standard HUD (health, ammo, etc) is disabled for
all players. This can allow you to record better-looking demos of staged
scenes (default = 0).
ininame: if set, changes the name of the Action INI file from "action.ini"
to whatever you specify. The file must always be located in your Action
game directory. This should be used on the Quake2 commandline, ie:
quake2 +set game action +set ininame alternate.ini +set dedicated 1 ...
(default = "action.ini").
ACTION-SPECIFIC PLAYER COMMANDS
@ -91,6 +101,14 @@ motd: brings up the MOTD (message of the day) again.
spectator: can be set to 0 or 1 ("spectator 0", "spectator 1") to toggle being
a spectator in DM games.
hand: in addition to the normal Q2 modes (0 = right-handed, 1 =
left-handed, 2 = "center"-handed), you can select "classic" style shooting
(where shots end up left/right and below the crosshair), or "classic high"
style shooting (where shots end up left/right of the crosshair). The
proper commands to select those modes are: hand "0 classic" (right-handed
classic), hand "0 classic high" (right-handed classic high), etc. Note
that the double-quotes are required.
choose: chooses a particular item or weapon as your item or weapon, without
going through the menus, in teamplay (ie: "choose mp5/10 submachinegun" or
"choose lasersight").
@ -193,25 +211,27 @@ standard Q2 "dmflags" values.
action/action.ini is the configuration file for map rotation and teamplay team
name/model/skin setup. See the example for information on the format.
action/motd.txt, if present, will be appended to the server MOTD.
action/motd.txt, if present, will be appended to the server MOTD. The
server command "sv reloadmotd" can be used to reload it from disk at any
time, and it is also reloaded at the end of each level automatically.
IP BANNING
Commands: addip, removeip, listip, writeip
Commands: sv addip, sv removeip, sv listip, sv writeip
Server variables: filterban
You can add or remove addresses from the IP filter list with the commands
"addip <ip>" and "removeip <ip>". The IP address is specified in numeric dot
format, and any unspecified digits will match any value, so you can specify an
entire class C network with "addip 240.200.100", for example. "removeip" will
only remove an address specified in the exact same way. The "listip" command
will print the current list of filters. The "writeip" command will dump the
current filters to a config file, "listip.cfg" in your Action directory. You
should add a line in your normal server.cfg that does an "exec listip.cfg" to
load this file by default. IP addresses in the filter list will only be
prohibited from connecting if the "filterban" variable is set to 1 (this is the
default).
"sv addip <ip>" and "sv removeip <ip>". The IP address is specified in
numeric dot format, and any unspecified digits will match any value, so
you can specify an entire class C network with "addip 240.200.100", for
example. "sv removeip" will only remove an address specified in the exact
same way. The "sv listip" command will print the current list of filters.
The "sv writeip" command will dump the current filters to a config file,
"listip.cfg" in your Action directory. You should add a line in your
normal server.cfg that does an "exec listip.cfg" to load this file by
default. IP addresses in the filter list will only be prohibited from
connecting if the "filterban" variable is set to 1 (this is the default).
REPORTING BUGS OR MAKING COMMENTS

View file

@ -108,9 +108,12 @@ void LaserSightThink (edict_t *self)
{
vec3_t start,end,endp,offset;
vec3_t forward,right,up;
vec3_t angles;
trace_t tr;
AngleVectors (self->owner->client->v_angle, forward, right, up);
// zucc compensate for weapon ride up
VectorAdd (self->owner->client->v_angle, self->owner->client->kick_angles, angles);
AngleVectors (/*self->owner->client->v_angle*/angles, forward, right, up);
if ( self->owner->lasersight != self )
@ -139,6 +142,12 @@ void LaserSightThink (edict_t *self)
}
void Cmd_New_Reload_f( edict_t *ent )
{
ent->client->reload_attempts++;
}
//+BD ENTIRE CODE BLOCK NEW
// Cmd_Reload_f()
// Handles weapon reload requests
@ -158,11 +167,16 @@ void Cmd_Reload_f (edict_t *ent)
|| ent->client->bandaging == 1
|| ent->client->bandage_stopped == 1
|| ent->client->weaponstate == WEAPON_ACTIVATING
|| ent->client->weaponstate == WEAPON_DROPPING )
|| ent->client->weaponstate == WEAPON_DROPPING
|| ent->client->weaponstate == WEAPON_FIRING )
{
return;
}
if (!ent->client->fast_reload)
ent->client->reload_attempts--;
if ( ent->client->reload_attempts < 0 )
ent->client->reload_attempts = 0;
//First, grab the current magazine max count...
if ( ( ent->client->curr_weap == MK23_NUM )
@ -385,8 +399,10 @@ void Cmd_Bandage_f ( edict_t *ent )
// zucc - check if they have a primed grenade
if ( ent->client->curr_weap == GRENADE_NUM
&& ( ent->client->ps.gunframe >= GRENADE_IDLE_FIRST
&& ent->client->ps.gunframe <= GRENADE_IDLE_LAST ) )
&& ( ( ent->client->ps.gunframe >= GRENADE_IDLE_FIRST
&& ent->client->ps.gunframe <= GRENADE_IDLE_LAST )
|| ( ent->client->ps.gunframe >= GRENADE_THROW_FIRST
&& ent->client->ps.gunframe <= GRENADE_THROW_LAST ) ) )
{
ent->client->ps.gunframe = 0;
fire_grenade2 (ent, ent->s.origin, tv(0,0,0), GRENADE_DAMRAD, 0, 2, GRENADE_DAMRAD*2, false);
@ -502,7 +518,10 @@ void SetIDView(edict_t *ent)
vec3_t forward, dir;
trace_t tr;
edict_t *who, *best;
float bd = 0, d;
//FIREBLADE, suggested by hal[9k] 3/11/1999
float bd = 0.9;
//FIREBLADE
float d;
int i;
ent->client->ps.stats[STAT_ID_VIEW] = 0;

281
a_game.c
View file

@ -34,12 +34,20 @@ void ReadConfigFile()
FILE *config_file;
char buf[MAX_STR_LEN];
char reading_section[MAX_STR_LEN];
char inipath[MAX_STR_LEN];
int lines_into_section = -1;
cvar_t *ininame;
config_file = fopen(GAMEVERSION "/action.ini", "r");
ininame = gi.cvar("ininame", "action.ini", 0);
if (ininame->string && *(ininame->string))
sprintf(inipath, "%s/%s", GAMEVERSION, ininame->string);
else
sprintf(inipath, "%s/%s", GAMEVERSION, "action.ini");
config_file = fopen(inipath, "r");
if (config_file == NULL)
{
gi.dprintf("Unable to read %s\n", GAMEVERSION "/action.ini");
gi.dprintf("Unable to read %s\n", inipath);
return;
}
@ -163,143 +171,150 @@ void PrintMOTD(edict_t *ent)
"\n");
lines = 3;
// Line for server hostname, if set
if (hostname->string && strlen(hostname->string) && strcmp(hostname->string, "unnamed"))
{
//strcat(msg_buf, "Running at: ");
strcat(msg_buf, hostname->string);
strcat(msg_buf, "\n");
lines++;
}
if (!skipmotd->value)
{
// Line for server hostname, if set
if (hostname->string && strlen(hostname->string) && strcmp(hostname->string, "unnamed"))
{
//strcat(msg_buf, "Running at: ");
strcat(msg_buf, hostname->string);
strcat(msg_buf, "\n");
lines++;
}
/*
* Server-specific settings information
*/
// Line for game type
if (teamplay->value)
{
server_type = "teamplay";
}
else
{
if ((int)dmflags->value & DF_MODELTEAMS)
server_type = "deathmatch (teams by model)";
else if ((int)dmflags->value & DF_SKINTEAMS)
server_type = "deathmatch (teams by skin)";
else
server_type = "deathmatch (no teams)";
}
sprintf(msg_buf + strlen(msg_buf),
"Game type: %s\n",
server_type);
lines++;
// Line for frag and time limit
if ((int)fraglimit->value)
sprintf(msg_buf + strlen(msg_buf), "Frag limit: %d", (int)fraglimit->value);
else
strcat(msg_buf, "Frag limit: none");
if ((int)timelimit->value)
sprintf(msg_buf + strlen(msg_buf), " Time limit: %d\n", (int)timelimit->value);
else
strcat(msg_buf, " Time limit: none\n");
lines++;
// Teamplay: 3 lines for round limit/round time limit, and menu instructions
if (teamplay->value)
{
if ((int)roundlimit->value)
sprintf(msg_buf + strlen(msg_buf), "Round limit: %d", (int)roundlimit->value);
else
strcat(msg_buf, "Round limit: none");
if ((int)roundtimelimit->value)
sprintf(msg_buf + strlen(msg_buf), " Round time limit: %d\n", (int)roundtimelimit->value);
else
strcat(msg_buf, " Round time limit: none\n");
lines++;
}
// Check for weird unique items/weapons settings, and inform with a line
if ((int)unique_weapons->value != 1 ||
(int)unique_items->value != 1)
{
sprintf(msg_buf + strlen(msg_buf), "Max carry of special weaps: %d items: %d\n",
(int)unique_weapons->value, (int)unique_items->value);
lines++;
}
if (tgren->value > 0 || !(ir->value))
{
char grenade_num[32];
if (tgren->value > 0)
sprintf(grenade_num, "%d grenade%s",
(int)tgren->value,
(int)tgren->value == 1 ? "" : "s");
sprintf(msg_buf + strlen(msg_buf), "Bandolier w/ %s%s%s\n",
!(ir->value) ? "no IR" : "",
(tgren->value > 0 && !(ir->value)) ? " & " : "",
tgren->value > 0 ? grenade_num : "");
lines++;
}
if (allitem->value || allweapon->value)
{
sprintf(msg_buf + strlen(msg_buf), "Players receive %s%s%s\n",
allweapon->value ? "all weapons" : "",
(allweapon->value && allitem->value) ? " & " : "",
allitem->value ? "all items" : "");
lines++;
}
// Teamplay: 2 lines (one blank) for menu instructions
if (teamplay->value)
{
strcat(msg_buf, "\nHit tab to open the team selection menu\n");
lines += 2;
}
/*
* If actionmaps, put a blank line then the maps list
*/
// hopefully no one will run enough maps to exceed the line limit, if so, oh well... -FB
if (actionmaps->value && num_maps > 0)
{
int chars_on_line, len_mr;
strcat(msg_buf, "\nRunning the following maps in order:\n");
lines += 2;
chars_on_line = 0;
for (mapnum = 0; mapnum < num_maps; mapnum++)
{
len_mr = strlen(*(map_rotation + mapnum));
if ((chars_on_line + len_mr + 2) > 39)
{
strcat(msg_buf, "\n");
lines++;
chars_on_line = 0;
}
strcat(msg_buf, *(map_rotation + mapnum));
chars_on_line += len_mr;
if (mapnum < (num_maps - 1))
{
strcat(msg_buf, ", ");
chars_on_line += 2;
}
}
strcat(msg_buf, "\n");
lines++;
}
if (motd_num_lines)
{
strcat(msg_buf, "\n");
lines++;
}
}
/*
* Server-specific settings information
*/
// Line for game type
if (teamplay->value)
{
server_type = "teamplay";
}
else
{
if ((int)dmflags->value & DF_MODELTEAMS)
server_type = "deathmatch (teams by model)";
else if ((int)dmflags->value & DF_SKINTEAMS)
server_type = "deathmatch (teams by skin)";
else
server_type = "deathmatch (no teams)";
}
sprintf(msg_buf + strlen(msg_buf),
"Game type: %s\n",
server_type);
lines++;
// Line for frag and time limit
if ((int)fraglimit->value)
sprintf(msg_buf + strlen(msg_buf), "Frag limit: %d", (int)fraglimit->value);
else
strcat(msg_buf, "Frag limit: none");
if ((int)timelimit->value)
sprintf(msg_buf + strlen(msg_buf), " Time limit: %d\n", (int)timelimit->value);
else
strcat(msg_buf, " Time limit: none\n");
lines++;
// Teamplay: 3 lines for round limit/round time limit, and menu instructions
if (teamplay->value)
{
if ((int)roundlimit->value)
sprintf(msg_buf + strlen(msg_buf), "Round limit: %d", (int)roundlimit->value);
else
strcat(msg_buf, "Round limit: none");
if ((int)roundtimelimit->value)
sprintf(msg_buf + strlen(msg_buf), " Round time limit: %d\n", (int)roundtimelimit->value);
else
strcat(msg_buf, " Round time limit: none\n");
lines++;
}
// Check for weird unique items/weapons settings, and inform with a line
if ((int)unique_weapons->value != 1 ||
(int)unique_items->value != 1)
{
sprintf(msg_buf + strlen(msg_buf), "Max carry of special weaps: %d items: %d\n",
(int)unique_weapons->value, (int)unique_items->value);
lines++;
}
if (tgren->value || !(ir->value))
{
char grenade_num[32];
if (tgren->value)
sprintf(grenade_num, "%d grenade%s",
(int)tgren->value,
(int)tgren->value == 1 ? "" : "s");
sprintf(msg_buf + strlen(msg_buf), "Bandolier w/ %s%s%s\n",
!(ir->value) ? "no IR" : "",
(tgren->value && !(ir->value)) ? " & " : "",
tgren->value ? grenade_num : "");
lines++;
}
if (allitem->value || allweapon->value)
{
sprintf(msg_buf + strlen(msg_buf), "Players receive %s%s%s\n",
allweapon->value ? "all weapons" : "",
(allweapon->value && allitem->value) ? " & " : "",
allitem->value ? "all items" : "");
lines++;
}
// Teamplay: 2 lines (one blank) for menu instructions
if (teamplay->value)
{
strcat(msg_buf, "\nHit tab to open the team selection menu\n");
lines += 2;
}
/*
* If actionmaps, put a blank line then the maps list
*/
// hopefully no one will run enough maps to exceed the line limit, if so, oh well... -FB
if (actionmaps->value && num_maps > 0)
{
int chars_on_line, len_mr;
strcat(msg_buf, "\nRunning the following maps in order:\n");
lines += 2;
chars_on_line = 0;
for (mapnum = 0; mapnum < num_maps; mapnum++)
{
len_mr = strlen(*(map_rotation + mapnum));
if ((chars_on_line + len_mr + 2) > 39)
{
strcat(msg_buf, "\n");
lines++;
chars_on_line = 0;
}
strcat(msg_buf, *(map_rotation + mapnum));
chars_on_line += len_mr;
if (mapnum < (num_maps - 1))
{
strcat(msg_buf, ", ");
chars_on_line += 2;
}
}
strcat(msg_buf, "\n");
lines++;
}
/*
* Insert blank line & action/motd.txt contents (whole MOTD gets truncated after 30 lines)
* Insert action/motd.txt contents (whole MOTD gets truncated after 30 lines)
*/
if (motd_num_lines)
{
strcat(msg_buf, "\n");
lines++;
if (lines < max_lines)
{
for (i = 0; i < motd_num_lines; i++)

View file

@ -2,7 +2,7 @@
* Include for base Action game-related things
*/
#define ACTION_VERSION "1.5"
#define ACTION_VERSION "1.51"
extern char team1_name[];
extern char team2_name[];
@ -24,3 +24,8 @@ qboolean loc_CanSee(edict_t *, edict_t *);
qboolean IsNeutral(edict_t *);
qboolean IsFemale(edict_t *);
void ParseSayText(edict_t *, char *);
// Firing styles (where shots originate from)
#define ACTION_FIRING_CENTER 0
#define ACTION_FIRING_CLASSIC 1
#define ACTION_FIRING_CLASSIC_HIGH 2

View file

@ -100,7 +100,27 @@ void DeleteFirstRadioQueueEntry(edict_t *ent)
return;
}
for (i = 1; i < MAX_RADIO_QUEUE_SIZE; i++)
for (i = 1; i < ent->client->resp.radio_queue_size; i++)
{
memcpy(&(ent->client->resp.radio_queue[i - 1]),
&(ent->client->resp.radio_queue[i]),
sizeof(radio_queue_entry_t));
}
ent->client->resp.radio_queue_size--;
}
void DeleteRadioQueueEntry(edict_t *ent, int entry_num)
{
int i;
if (ent->client->resp.radio_queue_size <= entry_num)
{
gi.dprintf("DeleteRadioQueueEntry: attempt to delete out of range queue entry\n");
return;
}
for (i = entry_num + 1; i < ent->client->resp.radio_queue_size; i++)
{
memcpy(&(ent->client->resp.radio_queue[i - 1]),
&(ent->client->resp.radio_queue[i]),
@ -161,6 +181,7 @@ void RadioThink(edict_t *ent)
{
char snd_play_cmd[512];
edict_t *from;
int check;
from = ent->client->resp.radio_queue[0].from_player;
@ -177,6 +198,15 @@ void RadioThink(edict_t *ent)
strcpy(ent->client->resp.radio_queue[0].soundfile, RADIO_DEATH_MALE);
ent->client->resp.radio_queue[0].length = RADIO_DEATH_MALE_LEN;
}
for (check = 1; check < ent->client->resp.radio_queue_size; check++)
{
if (ent->client->resp.radio_queue[check].from_player == from)
{
DeleteRadioQueueEntry(ent, check);
check--;
}
}
}
sprintf(snd_play_cmd, "play %s", ent->client->resp.radio_queue[0].soundfile);
@ -455,7 +485,10 @@ edict_t *DetermineViewedTeammate(edict_t *ent)
vec3_t forward, dir;
trace_t tr;
edict_t *who, *best;
float bd = 0, d;
//FIREBLADE, suggested by hal[9k] 3/11/1999
float bd = 0.9;
//FIREBLADE
float d;
int i;
AngleVectors(ent->client->v_angle, forward, NULL, NULL);

View file

@ -581,7 +581,11 @@ int UpdateJoinMenu(edict_t *ent)
return TEAM2;
else if (num2 > num1)
return TEAM1;
else
else if (team1_score > team2_score)
return TEAM2;
else if (team2_score > team1_score)
return TEAM1;
else
return TEAM1;
}
@ -1075,7 +1079,7 @@ void A_ScoreboardMessage (edict_t *ent, edict_t *killer)
if (ent->client->scoreboardnum == 1)
{
int team, len;
int team, len, deadview;
int sorted[TEAM_TOP][MAX_CLIENTS];
int sortedscores[TEAM_TOP][MAX_CLIENTS];
int score, total[TEAM_TOP], totalscore[TEAM_TOP];
@ -1083,6 +1087,10 @@ void A_ScoreboardMessage (edict_t *ent, edict_t *killer)
int stoppedat[TEAM_TOP];
int name_pos[TEAM_TOP];
deadview = (ent->solid == SOLID_NOT ||
ent->deadflag == DEAD_DEAD ||
!team_round_going);
ent->client->ps.stats[STAT_TEAM_HEADER] = gi.imageindex ("tag3");
total[TEAM1] = total[TEAM2] = totalalive[TEAM1] = totalalive[TEAM2] =
@ -1121,7 +1129,8 @@ void A_ScoreboardMessage (edict_t *ent, edict_t *killer)
sortedscores[team][j] = score;
totalscore[team] += score;
total[team]++;
if (cl_ent->solid != SOLID_NOT)
if (cl_ent->solid != SOLID_NOT &&
cl_ent->deadflag != DEAD_DEAD)
totalalive[team]++;
}
@ -1183,7 +1192,8 @@ void A_ScoreboardMessage (edict_t *ent, edict_t *killer)
{
cl = &game.clients[sorted[TEAM1][i]];
cl_ent = g_edicts + 1 + sorted[TEAM1][i];
if (cl_ent->solid != SOLID_NOT)
if (cl_ent->solid != SOLID_NOT &&
cl_ent->deadflag != DEAD_DEAD)
totalaliveprinted[TEAM1]++;
// AQ truncates names at 12, not sure why, except maybe to conserve scoreboard
@ -1192,7 +1202,7 @@ void A_ScoreboardMessage (edict_t *ent, edict_t *killer)
sprintf(string+strlen(string),
"xv 0 yv %d string%s \"%s\" ",
42 + i * 8,
(ent->solid == SOLID_NOT) ? (cl_ent->solid == SOLID_NOT ? "" : "2") : "",
deadview ? (cl_ent->solid == SOLID_NOT ? "" : "2") : "",
game.clients[sorted[TEAM1][i]].pers.netname);
}
@ -1200,7 +1210,8 @@ void A_ScoreboardMessage (edict_t *ent, edict_t *killer)
{
cl = &game.clients[sorted[TEAM2][i]];
cl_ent = g_edicts + 1 + sorted[TEAM2][i];
if (cl_ent->solid != SOLID_NOT)
if (cl_ent->solid != SOLID_NOT &&
cl_ent->deadflag != DEAD_DEAD)
totalaliveprinted[TEAM2]++;
// AQ truncates names at 12, not sure why, except maybe to conserve scoreboard
@ -1209,7 +1220,7 @@ void A_ScoreboardMessage (edict_t *ent, edict_t *killer)
sprintf(string+strlen(string),
"xv 160 yv %d string%s \"%s\" ",
42 + i * 8,
(ent->solid == SOLID_NOT) ? (cl_ent->solid == SOLID_NOT ? "" : "2") : "",
deadview ? (cl_ent->solid == SOLID_NOT ? "" : "2") : "",
game.clients[sorted[TEAM2][i]].pers.netname);
}
@ -1217,7 +1228,7 @@ void A_ScoreboardMessage (edict_t *ent, edict_t *killer)
}
// Print remaining players if we ran out of room...
if (ent->solid != SOLID_NOT) // live player viewing scoreboard...
if (!deadview) // live player viewing scoreboard...
{
if (stoppedat[TEAM1] > -1)
{
@ -1243,7 +1254,7 @@ void A_ScoreboardMessage (edict_t *ent, edict_t *killer)
if (stoppedat[TEAM2] > -1)
{
sprintf(string + strlen(string), "xv 160 yv %d string%s \"..and %d/%d more\" ",
42 + (stoppedat[TEAM1] * 8),
42 + (stoppedat[TEAM2] * 8),
(totalalive[TEAM2] - totalaliveprinted[TEAM2]) ? "2" : "",
totalalive[TEAM2] - totalaliveprinted[TEAM2],
total[TEAM2] - stoppedat[TEAM2]);

View file

@ -33,6 +33,9 @@ qboolean OnSameTeam (edict_t *ent1, edict_t *ent2)
char ent2Team [512];
//FIREBLADE
if (!ent1->client || !ent2->client)
return false;
if (teamplay->value)
{
return ent1->client->resp.team == ent2->client->resp.team;
@ -870,23 +873,33 @@ void Cmd_Players_f (edict_t *ent)
count = 0;
for (i = 0 ; i < maxclients->value ; i++)
{
if (game.clients[i].pers.connected)
{
index[count] = i;
count++;
}
}
// sort by frags
qsort (index, count, sizeof(index[0]), PlayerSort);
if (!teamplay->value || !noscore->value)
{
// sort by frags
qsort (index, count, sizeof(index[0]), PlayerSort);
}
// print information
large[0] = 0;
for (i = 0 ; i < count ; i++)
{
Com_sprintf (small, sizeof(small), "%3i %s\n",
game.clients[index[i]].ps.stats[STAT_FRAGS],
game.clients[index[i]].pers.netname);
if (!teamplay->value || !noscore->value)
Com_sprintf (small, sizeof(small), "%3i %s\n",
game.clients[index[i]].ps.stats[STAT_FRAGS],
game.clients[index[i]].pers.netname);
else
Com_sprintf (small, sizeof(small), "%s\n",
game.clients[index[i]].pers.netname);
if (strlen (small) + strlen(large) > sizeof(large) - 100 )
{ // can't print all of them in one packet
strcat (large, "...\n");
@ -975,15 +988,15 @@ void Cmd_Say_f (edict_t *ent, qboolean team, qboolean arg0, qboolean partner_msg
if (team)
Com_sprintf (text, sizeof(text), "%s(%s): ",
(teamplay->value && ent->solid == SOLID_NOT) ? "[DEAD] " : "",
(teamplay->value && (ent->solid == SOLID_NOT || ent->deadflag == DEAD_DEAD)) ? "[DEAD] " : "",
ent->client->pers.netname);
else if (partner_msg)
Com_sprintf (text, sizeof(text), "[%sPARTNER] %s: ",
(ent->solid == SOLID_NOT) ? "DEAD " : "",
(teamplay->value && (ent->solid == SOLID_NOT || ent->deadflag == DEAD_DEAD)) ? "DEAD " : "",
ent->client->pers.netname);
else
Com_sprintf (text, sizeof(text), "%s%s: ",
(teamplay->value && ent->solid == SOLID_NOT) ? "[DEAD] " : "",
(teamplay->value && (ent->solid == SOLID_NOT || ent->deadflag == DEAD_DEAD)) ? "[DEAD] " : "",
ent->client->pers.netname);
if (arg0)
@ -1065,7 +1078,8 @@ void Cmd_Say_f (edict_t *ent, qboolean team, qboolean arg0, qboolean partner_msg
//FIREBLADE
if (teamplay->value && team_round_going)
{
if (ent->solid == SOLID_NOT && other->solid != SOLID_NOT)
if ((ent->solid == SOLID_NOT || ent->deadflag == DEAD_DEAD) &&
(other->solid != SOLID_NOT && other->deadflag != DEAD_DEAD))
continue;
}
//FIREBLADE
@ -1077,7 +1091,7 @@ void Cmd_PlayerList_f(edict_t *ent)
{
int i;
char st[80];
char text[1400];
char text[1280];
edict_t *e2;
// connect time, ping, score, name
@ -1086,15 +1100,24 @@ void Cmd_PlayerList_f(edict_t *ent)
if (!e2->inuse)
continue;
Com_sprintf(st, sizeof(st), "%02d:%02d %4d %3d %s%s\n",
(level.framenum - e2->client->resp.enterframe) / 600,
((level.framenum - e2->client->resp.enterframe) % 600)/10,
e2->client->ping,
e2->client->resp.score,
e2->client->pers.netname,
(e2->solid == SOLID_NOT && e2->deadflag != DEAD_DEAD) ? " (spectator)" : "");
if (strlen(text) + strlen(st) > sizeof(text) - 50) {
sprintf(text+strlen(text), "...and more.\n");
if (!teamplay->value || !noscore->value)
Com_sprintf(st, sizeof(st), "%02d:%02d %4d %3d %s%s\n",
(level.framenum - e2->client->resp.enterframe) / 600,
((level.framenum - e2->client->resp.enterframe) % 600)/10,
e2->client->ping,
e2->client->resp.score,
e2->client->pers.netname,
(e2->solid == SOLID_NOT && e2->deadflag != DEAD_DEAD) ? " (spectator)" : "");
else
Com_sprintf(st, sizeof(st), "%02d:%02d %4d %s%s\n",
(level.framenum - e2->client->resp.enterframe) / 600,
((level.framenum - e2->client->resp.enterframe) % 600)/10,
e2->client->ping,
e2->client->pers.netname,
(e2->solid == SOLID_NOT && e2->deadflag != DEAD_DEAD) ? " (spectator)" : "");
if (strlen(text) + strlen(st) > sizeof(text) - 100) {
sprintf(text+strlen(text), "...\n");
gi.cprintf(ent, PRINT_HIGH, "%s", text);
return;
}
@ -1193,7 +1216,7 @@ void ClientCommand (edict_t *ent)
// else if (Q_stricmp (cmd, "laser") == 0)
// SP_LaserSight (ent);
else if (Q_stricmp (cmd, "reload") == 0)
Cmd_Reload_f (ent);
Cmd_New_Reload_f (ent);
else if (Q_stricmp (cmd, "weapon") == 0)
Cmd_Weapon_f (ent);
else if (Q_stricmp (cmd, "opendoor") == 0)

View file

@ -359,18 +359,18 @@ void BloodSprayThink (edict_t *self)
{
if ( self->dmg > 0 )
/* if ( self->dmg > 0 )
{
self->dmg -= 10;
// SpawnDamage (TE_BLOOD, self->s.origin, self->movedir, self->dmg);
/* gi.WriteByte (svc_temp_entity);
gi.WriteByte (svc_temp_entity);
gi.WriteByte (TE_SPLASH);
gi.WriteByte (6);
gi.WritePosition (self->s.origin);
gi.WriteDir (self->movedir);
gi.WriteByte (6); //blood
gi.multicast (self->s.origin, MULTICAST_PVS);
*/
}
else
{
@ -379,6 +379,9 @@ void BloodSprayThink (edict_t *self)
self->nextthink = level.time + 0.1;
gi.linkentity (self);
*/
G_FreeEdict(self);
}
@ -392,12 +395,43 @@ void blood_spray_touch (edict_t *ent, edict_t *other, cplane_t *plane, csurface_
void spray_blood (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed )
void spray_blood (edict_t *self, vec3_t start, vec3_t dir, int damage, int mod )
{
edict_t *blood;
int speed;
switch(mod)
{
case MOD_MK23:
speed = 1800;
break;
case MOD_MP5:
speed = 1500;
break;
case MOD_M4:
speed = 2400;
break;
case MOD_KNIFE:
speed = 0;
break;
case MOD_KNIFE_THROWN:
speed = 0;
break;
case MOD_DUAL:
speed = 1800;
break;
case MOD_SNIPER:
speed = 4000;
break;
default:
speed = 1800;
}
blood = G_Spawn();
VectorNormalize(dir);
VectorNormalize(dir);
VectorCopy (start, blood->s.origin);
VectorCopy (dir, blood->movedir);
vectoangles (dir, blood->s.angles);
@ -410,7 +444,7 @@ void spray_blood (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed
VectorClear (blood->maxs);
blood->s.modelindex = gi.modelindex ("sprites/null.sp2");
blood->owner = self;
blood->nextthink = level.time + 0.1;
blood->nextthink = level.time + speed/1000;//3.2;
blood->touch = blood_spray_touch;
blood->think = BloodSprayThink;
blood->dmg = damage;
@ -420,8 +454,75 @@ void spray_blood (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed
}
// zucc based on some code in Action Quake
void spray_sniper_blood( edict_t *self, vec3_t start, vec3_t dir )
{
vec3_t forward;
int mod = MOD_SNIPER;
VectorCopy (dir, forward);
forward[2] += .03;
spray_blood(self, start, forward, 0, mod);
VectorCopy (dir, forward);
forward[2] -= .03;
spray_blood(self, start, forward, 0, mod);
VectorCopy (dir, forward);
if ( (forward[0] > 0) && (forward[1] > 0) )
{
forward[0] -= .03;
forward[1] += .03;
}
if ( (forward[0] > 0) && (forward[1] < 0) )
{
forward[0] += .03;
forward[1] += .03;
}
if ( (forward[0] < 0) && (forward[1] > 0) )
{
forward[0] -= .03;
forward[1] -= .03;
}
if ( (forward[0] < 0) && (forward[1] < 0) )
{
forward[0] += .03;
forward[1] -= .03;
}
spray_blood(self, start, forward, 0, mod);
VectorCopy (dir, forward);
if ( (forward[0] > 0) && (forward[1] > 0) )
{
forward[0] += .03;
forward[1] -= .03;
}
if ( (forward[0] > 0) && (forward[1] < 0) )
{
forward[0] -= .03;
forward[1] -= .03;
}
if ( (forward[0] < 0) && (forward[1] > 0) )
{
forward[0] += .03;
forward[1] += .03;
}
if ( (forward[0] < 0) && (forward[1] < 0) )
{
forward[0] -= .03;
forward[1] += .03;
}
spray_blood(self, start, forward, 0, mod);
VectorCopy (dir, forward);
spray_blood(self, start, forward, 0, mod);
}
void VerifyHeadShot( vec3_t point, vec3_t dir, float height, vec3_t newpoint)
@ -487,7 +588,25 @@ void T_Damage (edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir,
return;
}
//FIREBLADE
// damage reduction for shotgun
// if far away, reduce it to original action levels
if ( mod == MOD_M3 )
{
VectorSubtract(targ->s.origin, inflictor->s.origin, line );
dist = VectorLength( line );
if ( dist > 450.0 )
{
damage = damage - 2;
}
}
item = FindItem(KEV_NAME);
height = abs(targ->mins[2]) + targ->maxs[2];
@ -652,13 +771,20 @@ void T_Damage (edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir,
{
vec3_t temp;
vec3_t temporig;
//VectorMA (targ->s.origin, 50, dir, temp);
VectorScale( dir, 20, temp);
//vec3_t forward;
VectorMA (targ->s.origin, 50, dir, temp);
//AngleVectors (attacker->client->v_angle, forward, NULL, NULL);
VectorScale( dir, 20, temp);
VectorAdd( point, temp, temporig );
spray_blood (targ, temporig, dir, damage*3, 1800 );
if ( mod != MOD_SNIPER )
spray_blood (targ, temporig, dir, damage, mod );
else
{
spray_sniper_blood( targ, temporig, dir );
}
}
if ( mod == MOD_FALLING)
if ( mod == MOD_FALLING && !(targ->flags & FL_GODMODE))
{
if ( targ->client && targ->health > 0)
{

View file

@ -235,40 +235,40 @@ void Drop_Special( edict_t *ent, gitem_t *item)
}
*/
if ( stricmp( item->pickup_name, BAND_NAME ) == 0
&& ent->client->pers.inventory[ITEM_INDEX(item)] <= 1 )
&& ent->client->pers.inventory[ITEM_INDEX(item)] <= 1 )
{
ent->client->pers.max_bullets = 2;
if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("Pistol Clip"))] > 2 )
ent->client->pers.inventory[ITEM_INDEX(FindItem("Pistol Clip"))] = 2;
ent->client->pers.max_shells = 14;
if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("12 Gauge Shells"))] > 14 )
ent->client->pers.inventory[ITEM_INDEX(FindItem("12 Gauge Shells"))] = 14;
ent->client->pers.max_cells = 1;
if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("M4 Clip"))] > 1 )
ent->client->pers.inventory[ITEM_INDEX(FindItem("M4 Clip"))] = 1;
ent->client->pers.max_grenades = 2;
if ( ent->client->pers.inventory[ITEM_INDEX(FindItem(GRENADE_NAME))] > 2 )
ent->client->pers.inventory[ITEM_INDEX(FindItem(GRENADE_NAME))] = 2;
ent->client->pers.max_rockets = 2;
if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("Machinegun Magazine"))] > 2 )
ent->client->pers.inventory[ITEM_INDEX(FindItem("Machinegun Magazine"))] = 2;
ent->client->knife_max = 10;
if ( ent->client->pers.inventory[ITEM_INDEX(FindItem(KNIFE_NAME))] > 10 )
ent->client->pers.inventory[ITEM_INDEX(FindItem(KNIFE_NAME))] = 10;
ent->client->pers.max_slugs = 20;
if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("AP Sniper Ammo"))] > 20 )
ent->client->pers.inventory[ITEM_INDEX(FindItem("AP Sniper Ammo"))] = 20;
if ( ent->client->unique_weapon_total > unique_weapons->value && !allweapon->value )
{
DropExtraSpecial(ent);
gi.cprintf(ent, PRINT_HIGH, "One of your guns is dropped with the bandolier.\n");
}
}
ent->client->pers.max_bullets = 2;
if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("Pistol Clip"))] > 2 )
ent->client->pers.inventory[ITEM_INDEX(FindItem("Pistol Clip"))] = 2;
ent->client->pers.max_shells = 14;
if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("12 Gauge Shells"))] > 14 )
ent->client->pers.inventory[ITEM_INDEX(FindItem("12 Gauge Shells"))] = 14;
ent->client->pers.max_cells = 1;
if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("M4 Clip"))] > 1 )
ent->client->pers.inventory[ITEM_INDEX(FindItem("M4 Clip"))] = 1;
ent->client->grenade_max = 2;
if ( ent->client->pers.inventory[ITEM_INDEX(FindItem(GRENADE_NAME))] > 2 )
ent->client->pers.inventory[ITEM_INDEX(FindItem(GRENADE_NAME))] = 2;
ent->client->pers.max_rockets = 2;
if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("Machinegun Magazine"))] > 2 )
ent->client->pers.inventory[ITEM_INDEX(FindItem("Machinegun Magazine"))] = 2;
ent->client->knife_max = 10;
if ( ent->client->pers.inventory[ITEM_INDEX(FindItem(KNIFE_NAME))] > 10 )
ent->client->pers.inventory[ITEM_INDEX(FindItem(KNIFE_NAME))] = 10;
ent->client->pers.max_slugs = 20;
if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("AP Sniper Ammo"))] > 20 )
ent->client->pers.inventory[ITEM_INDEX(FindItem("AP Sniper Ammo"))] = 20;
if ( ent->client->unique_weapon_total > unique_weapons->value && !allweapon->value )
{
DropExtraSpecial(ent);
gi.cprintf(ent, PRINT_HIGH, "One of your guns is dropped with the bandolier.\n");
}
}
Drop_Spec (ent, item);
ValidateSelectedItem (ent);
SP_LaserSight(ent, item);

View file

@ -526,6 +526,7 @@ extern cvar_t *motd_time;
extern cvar_t *actionmaps;
extern cvar_t *roundtimelimit;
extern cvar_t *roundlimit;
extern cvar_t *skipmotd;
extern cvar_t *nohud;
extern cvar_t *noscore;
extern cvar_t *actionversion;
@ -893,6 +894,7 @@ typedef struct
//FIREBLADE
qboolean spectator;
int firing_style;
//FIREBLADE
} client_persistant_t;
@ -1080,13 +1082,16 @@ struct gclient_s
int doortoggle; // set by player with opendoor command
edict_t* attacker; // keep track of the last person to hit us
edict_t* attacker; // keep track of the last person to hit us
int attacker_mod; // and how they hit us
int attacker_loc; // location of the hit
int push_timeout; // timeout for how long an attacker will get fall death credit
int push_timeout; // timeout for how long an attacker will get fall death credit
int jumping;
int reload_attempts;
//FIREBLADE
qboolean inmenu; // in menu
@ -1260,6 +1265,7 @@ struct edict_s
void LaserSightThink (edict_t *self);
void SP_LaserSight(edict_t *self, gitem_t *item );
void Cmd_Reload_f (edict_t *ent);
void Cmd_New_Reload_f (edict_t *ent);
void Cmd_Weapon_f ( edict_t *ent );
void Cmd_OpenDoor_f (edict_t *ent );
void Cmd_Bandage_f ( edict_t *ent );
@ -1366,6 +1372,8 @@ bind 6 "use Sniper Rifle"
#define GRENADE_IDLE_FIRST 40
#define GRENADE_IDLE_LAST 69
#define GRENADE_THROW_FIRST 4
#define GRENADE_THROW_LAST 9 // throw it on frame 8?
// these should be server variables, when I get around to it

View file

@ -24,6 +24,7 @@ cvar_t *motd_time;
cvar_t *actionmaps;
cvar_t *roundtimelimit;
cvar_t *roundlimit;
cvar_t *skipmotd;
cvar_t *nohud;
cvar_t *noscore;
cvar_t *actionversion;
@ -257,6 +258,7 @@ void EndDMLevel (void)
}
//FIREBLADE
ReadMOTDFile();
BeginIntermission (ent);
}

View file

@ -1,4 +1,3 @@
#include "g_local.h"
field_t fields[] = {
@ -156,6 +155,19 @@ void InitGame (void)
skill = gi.cvar ("skill", "1", CVAR_LATCH);
maxentities = gi.cvar ("maxentities", "1024", CVAR_LATCH);
//FIREBLADE
if (!deathmatch->value)
{
gi.dprintf("Turning deathmatch on.\n");
gi.cvar_set("deathmatch", "1");
}
if (coop->value)
{
gi.dprintf("Turning coop off.\n");
gi.cvar_set("coop", "0");
}
//FIREBLADE
// change anytime vars
dmflags = gi.cvar ("dmflags", "0", CVAR_SERVERINFO);
fraglimit = gi.cvar ("fraglimit", "0", CVAR_SERVERINFO);
@ -163,18 +175,19 @@ void InitGame (void)
password = gi.cvar ("password", "", CVAR_USERINFO);
filterban = gi.cvar("filterban", "1", 0);
//FIREBLADE
radiolog = gi.cvar("radiolog", "0", CVAR_SERVERINFO);
radiolog = gi.cvar("radiolog", "0", 0);
teamplay = gi.cvar ("teamplay", "0", CVAR_SERVERINFO|CVAR_LATCH);
motd_time = gi.cvar("motd_time", "2", CVAR_SERVERINFO);
motd_time = gi.cvar("motd_time", "2", 0);
hostname = gi.cvar("hostname", "unnamed", CVAR_SERVERINFO);
actionmaps = gi.cvar ("actionmaps", "1", CVAR_SERVERINFO);
actionmaps = gi.cvar ("actionmaps", "1", 0);
if (actionmaps->value && num_maps < 1)
{
gi.dprintf("No maps were read from the config file, \"actionmaps\" won't be used.\n");
gi.cvar_set("actionmaps", "0");
}
nohud = gi.cvar("nohud", "0", CVAR_SERVERINFO|CVAR_LATCH);
nohud = gi.cvar("nohud", "0", CVAR_LATCH);
roundlimit = gi.cvar("roundlimit", "0", CVAR_SERVERINFO);
skipmotd = gi.cvar("skipmotd", "0", 0);
roundtimelimit = gi.cvar("roundtimelimit", "0", CVAR_SERVERINFO);
noscore = gi.cvar("noscore", "0", CVAR_SERVERINFO|CVAR_LATCH);
actionversion = gi.cvar("actionversion", "none set", CVAR_SERVERINFO|CVAR_LATCH);
@ -191,14 +204,14 @@ void InitGame (void)
// zucc changed ir to 1, enabled
ir = gi.cvar("ir", "1", CVAR_SERVERINFO);
knifelimit = gi.cvar ("knifelimit", "40", CVAR_SERVERINFO);
knifelimit = gi.cvar ("knifelimit", "40", 0);
allweapon = gi.cvar ("allweapon", "0", CVAR_SERVERINFO);
allitem = gi.cvar ("allitem", "0", CVAR_SERVERINFO);
tgren = gi.cvar ("tgren", "0", CVAR_SERVERINFO);
// zucc from action
sv_shelloff = gi.cvar ("shelloff", "1", CVAR_SERVERINFO);
bholelimit = gi.cvar ("bholelimit", "0", CVAR_SERVERINFO);
splatlimit = gi.cvar ("splatlimit", "0", CVAR_SERVERINFO);
tgren = gi.cvar ("tgren", "0", CVAR_SERVERINFO);
// zucc from action
sv_shelloff = gi.cvar ("shelloff", "1", 0);
bholelimit = gi.cvar ("bholelimit", "0", 0);
splatlimit = gi.cvar ("splatlimit", "0", 0);
g_select_empty = gi.cvar ("g_select_empty", "0", CVAR_ARCHIVE);

View file

@ -315,7 +315,7 @@ void ED_CallSpawn (edict_t *ent)
//item[i][0] = the Q2 item to look for
//item[i][1] = the NS2 item to actually spawn
#define ITEM_SWITCH_COUNT 12
#define ITEM_SWITCH_COUNT 15
char *sp_item[ITEM_SWITCH_COUNT][2]=
{
@ -333,6 +333,10 @@ char *sp_item[ITEM_SWITCH_COUNT][2]=
{"ammo_slugs", "ammo_sniper"},
{"ammo_shells", "ammo_m3"},
{"ammo_grenades", "weapon_Grenade"}
,
{"ammo_box", "ammo_m3"},
{"weapon_cannon", "weapon_HC"},
{"weapon_sniper", "weapon_Sniper"}
};
@ -346,7 +350,7 @@ void CheckItem(edict_t *ent, gitem_t *item)
if(!sp_item[i][0])
continue;
//Do the passed ent and our list match?
if(Q_stricmp(ent->classname,sp_item[i][0])==0)
if(strcmp(ent->classname,sp_item[i][0])==0)
{
//Yep. Replace the Q2 entity with our own.
ent->classname = item->classname = sp_item[i][1];

View file

@ -1,10 +1,9 @@
#include "g_local.h"
void Svcmd_Test_f (void)
void SVCmd_ReloadMOTD_f()
{
gi.cprintf (NULL, PRINT_HIGH, "Svcmd_Test_f()\n");
ReadMOTDFile();
gi.cprintf(NULL, PRINT_HIGH, "MOTD reloaded.\n");
}
/*
@ -265,9 +264,8 @@ void ServerCommand (void)
char *cmd;
cmd = gi.argv(1);
if (Q_stricmp (cmd, "test") == 0)
Svcmd_Test_f ();
else if (Q_stricmp (cmd, "addip") == 0)
if (Q_stricmp (cmd, "addip") == 0)
SVCmd_AddIP_f ();
else if (Q_stricmp (cmd, "removeip") == 0)
SVCmd_RemoveIP_f ();
@ -275,6 +273,8 @@ void ServerCommand (void)
SVCmd_ListIP_f ();
else if (Q_stricmp (cmd, "writeip") == 0)
SVCmd_WriteIP_f ();
else if (Q_stricmp (cmd, "reloadmotd") == 0)
SVCmd_ReloadMOTD_f();
else
gi.cprintf (NULL, PRINT_HIGH, "Unknown server command \"%s\"\n", cmd);
}

View file

@ -1410,6 +1410,7 @@ void knife_throw (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed
{
edict_t *knife;
// vec3_t forward, right, up;
trace_t tr;
knife = G_Spawn();
@ -1452,6 +1453,14 @@ void knife_throw (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed
// if (self->client)
// check_dodge (self, rocket->s.origin, dir, speed);
tr = gi.trace (self->s.origin, NULL, NULL, knife->s.origin, knife, MASK_SHOT);
if (tr.fraction < 1.0)
{
VectorMA (knife->s.origin, -10, dir, knife->s.origin);
knife->touch (knife, tr.ent, NULL, NULL);
}
gi.linkentity (knife);
}

3454
p_client.c

File diff suppressed because it is too large Load diff

View file

@ -1221,8 +1221,15 @@ void ClientEndServerFrame (edict_t *ent)
// zucc - clear the open door command
ent->client->doortoggle = 0;
if ( ent->client->push_timeout > 0 )
ent->client->push_timeout--;
if ( ent->client->push_timeout > 0 )
ent->client->push_timeout--;
else
{
ent->client->attacker = NULL;
}
if ( ent->client->reload_attempts > 0 )
Cmd_Reload_f(ent);
// if the scoreboard is up, update it

1329
p_weapon.c

File diff suppressed because it is too large Load diff