mirror of
https://github.com/yquake2/zaero.git
synced 2024-11-10 06:32:04 +00:00
Was mergebar war, ist nun gemerged
This commit is contained in:
parent
c6fcf0eb12
commit
75ec3fea54
6 changed files with 123 additions and 166 deletions
|
@ -23,9 +23,6 @@
|
|||
#define Z_MALLOC(size) gi.TagMalloc(size, TAG_GAME)
|
||||
#define Z_FREE(block) gi.TagFree(block)
|
||||
|
||||
// Zaero includes
|
||||
#include "z_debug.h"
|
||||
|
||||
// the "gamename" client command will print this plus compile date
|
||||
#define GAMEVERSION "Zaero 1.1"
|
||||
|
||||
|
|
113
src/p_client.c
113
src/p_client.c
|
@ -37,7 +37,6 @@ static void SP_FixCoopSpots (edict_t *self)
|
|||
{
|
||||
if ((!self->targetname) || Q_stricmp(self->targetname, spot->targetname) != 0)
|
||||
{
|
||||
// gi.dprintf("FixCoopSpots changed %s at %s targetname from %s to %s\n", self->classname, vtos(self->s.origin), self->targetname, spot->targetname);
|
||||
self->targetname = spot->targetname;
|
||||
}
|
||||
return;
|
||||
|
@ -57,7 +56,7 @@ static void SP_CreateCoopSpots (edict_t *self)
|
|||
{
|
||||
spot = G_Spawn();
|
||||
spot->classname = "info_player_coop";
|
||||
spot->spawnflags2 = 0;
|
||||
spot->spawnflags2 = 0;
|
||||
spot->s.origin[0] = 188 - 64;
|
||||
spot->s.origin[1] = -164;
|
||||
spot->s.origin[2] = 80;
|
||||
|
@ -66,7 +65,7 @@ static void SP_CreateCoopSpots (edict_t *self)
|
|||
|
||||
spot = G_Spawn();
|
||||
spot->classname = "info_player_coop";
|
||||
spot->spawnflags2 = 0;
|
||||
spot->spawnflags2 = 0;
|
||||
spot->s.origin[0] = 188 + 64;
|
||||
spot->s.origin[1] = -164;
|
||||
spot->s.origin[2] = 80;
|
||||
|
@ -75,7 +74,7 @@ static void SP_CreateCoopSpots (edict_t *self)
|
|||
|
||||
spot = G_Spawn();
|
||||
spot->classname = "info_player_coop";
|
||||
spot->spawnflags2 = 0;
|
||||
spot->spawnflags2 = 0;
|
||||
spot->s.origin[0] = 188 + 128;
|
||||
spot->s.origin[1] = -164;
|
||||
spot->s.origin[2] = 80;
|
||||
|
@ -190,32 +189,32 @@ struct monsterObit {
|
|||
char *message;
|
||||
} obits[] =
|
||||
{
|
||||
"monster_soldier", "%s was slaughtered by a Shotgun Guard.\n",
|
||||
"monster_soldier_light", "%s was exterminated by a Light Guard.\n",
|
||||
"monster_soldier_ss", "%s was eradicated by a Machinegun Guard.\n",
|
||||
"monster_tank", "%s felt the pain of a Tank.\n",
|
||||
"monster_tank_commander", "%s was annihilated by a Tank Commander.\n",
|
||||
"monster_hound", "%s was leg humped to death by a Hound.\n",
|
||||
"monster_handler", "%s was ravished by an Enforcer.\n",
|
||||
"monster_infantry", "%s was obliterated by an Enforcer.\n",
|
||||
"monster_sentien", "%s was lobotomized by a badass Sentien.\n",
|
||||
"monster_zboss", "%s was killed by a big, bad MOFO.\n",
|
||||
"monster_gunner", "A Gunner went medievil on %s's ass.\n",
|
||||
"monster_berserk", "%s was shattered by a Berserker. TRESPASSA!\n",
|
||||
"monster_chick", "%s was bitch slapped by an Iron Maiden.\n",
|
||||
"monster_parasite", "%s was sucked by a Parasite.\n",
|
||||
"monster_mutant", "%s was demolished by a Mutant.\n",
|
||||
"monster_flyer", "%s was killed by a Flyer.\n",
|
||||
"monster_hover", "%s was waxed out by an Icarus.\n",
|
||||
"monster_medic", "%s overdosed on Medics\n",
|
||||
"monster_floater", "%s was tweaked by a Technician.\n",
|
||||
"monster_flipper", "%s was killed by a Barracuda Shark.\n",
|
||||
"monster_gladiator", "%s was made into swiss cheese by a Gladiator.\n",
|
||||
"monster_brain", "%s was scanned by a Brain.\n",
|
||||
"monster_supertank", "%s was stomped by a Super Tank.\n",
|
||||
"monster_boss2", "%s was killed by some flying boss thingy.\n",
|
||||
"monster_jorg", "%s was assassinated by a Jorg.\n",
|
||||
NULL, NULL
|
||||
{"monster_soldier", "%s was slaughtered by a Shotgun Guard.\n"},
|
||||
{"monster_soldier_light", "%s was exterminated by a Light Guard.\n"},
|
||||
{"monster_soldier_ss", "%s was eradicated by a Machinegun Guard.\n"},
|
||||
{"monster_tank", "%s felt the pain of a Tank.\n"},
|
||||
{"monster_tank_commander", "%s was annihilated by a Tank Commander.\n"},
|
||||
{"monster_hound", "%s was leg humped to death by a Hound.\n"},
|
||||
{"monster_handler", "%s was ravished by an Enforcer.\n"},
|
||||
{"monster_infantry", "%s was obliterated by an Enforcer.\n"},
|
||||
{"monster_sentien", "%s was lobotomized by a badass Sentien.\n"},
|
||||
{"monster_zboss", "%s was killed by a big, bad MOFO.\n"},
|
||||
{"monster_gunner", "A Gunner went medievil on %s's ass.\n"},
|
||||
{"monster_berserk", "%s was shattered by a Berserker. TRESPASSA!\n"},
|
||||
{"monster_chick", "%s was bitch slapped by an Iron Maiden.\n"},
|
||||
{"monster_parasite", "%s was sucked by a Parasite.\n"},
|
||||
{"monster_mutant", "%s was demolished by a Mutant.\n"},
|
||||
{"monster_flyer", "%s was killed by a Flyer.\n"},
|
||||
{"monster_hover", "%s was waxed out by an Icarus.\n"},
|
||||
{"monster_medic", "%s overdosed on Medics\n"},
|
||||
{"monster_floater", "%s was tweaked by a Technician.\n"},
|
||||
{"monster_flipper", "%s was killed by a Barracuda Shark.\n"},
|
||||
{"monster_gladiator", "%s was made into swiss cheese by a Gladiator.\n"},
|
||||
{"monster_brain", "%s was scanned by a Brain.\n"},
|
||||
{"monster_supertank", "%s was stomped by a Super Tank.\n"},
|
||||
{"monster_boss2", "%s was killed by some flying boss thingy.\n"},
|
||||
{"monster_jorg", "%s was assassinated by a Jorg.\n"},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
void ClientObituary (edict_t *self, edict_t *inflictor, edict_t *attacker)
|
||||
|
@ -478,11 +477,6 @@ void TossClientWeapon (edict_t *self)
|
|||
if (item && (strcmp (item->pickup_name, "Blaster") == 0))
|
||||
item = NULL;
|
||||
|
||||
#if defined(_DEBUG) && defined(_Z_TESTMODE)
|
||||
if (item && (strcmp (item->pickup_name, "Line Draw") == 0))
|
||||
item = NULL;
|
||||
#endif
|
||||
|
||||
if (!((int)(dmflags->value) & DF_QUAD_DROP))
|
||||
quad = false;
|
||||
else
|
||||
|
@ -575,7 +569,6 @@ void player_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damag
|
|||
|
||||
self->maxs[2] = -8;
|
||||
|
||||
// self->solid = SOLID_NOT;
|
||||
self->svflags |= SVF_DEADMONSTER;
|
||||
|
||||
if (!self->deadflag)
|
||||
|
@ -662,9 +655,6 @@ void InitClientPersistant (gclient_t *client)
|
|||
|
||||
memset (&client->pers, 0, sizeof(client->pers));
|
||||
|
||||
#if defined(_DEBUG) && defined(_Z_TESTMODE)
|
||||
client->pers.inventory[ITEM_INDEX(FindItem("Line Draw"))] = 1;
|
||||
#endif
|
||||
item = FindItem("Push");
|
||||
client->pers.inventory[ITEM_INDEX(item)] = 1;
|
||||
|
||||
|
@ -1054,7 +1044,10 @@ void respawn (edict_t *self)
|
|||
{
|
||||
if (deathmatch->value || coop->value)
|
||||
{
|
||||
CopyToBodyQue (self);
|
||||
// spectator's don't leave bodies
|
||||
if (self->movetype != MOVETYPE_NOCLIP)
|
||||
CopyToBodyQue (self);
|
||||
self->svflags &= ~SVF_NOCLIENT;
|
||||
PutClientInServer (self);
|
||||
|
||||
// add a teleportation effect
|
||||
|
@ -1086,8 +1079,8 @@ a deathmatch.
|
|||
*/
|
||||
void PutClientInServer (edict_t *ent)
|
||||
{
|
||||
vec3_t mins = {-16, -16, -24};
|
||||
vec3_t maxs = {16, 16, 32};
|
||||
vec3_t mins = {-16, -16, -24};
|
||||
vec3_t maxs = {16, 16, 32};
|
||||
int index;
|
||||
vec3_t spawn_origin, spawn_angles;
|
||||
gclient_t *client;
|
||||
|
@ -1177,7 +1170,7 @@ void PutClientInServer (edict_t *ent)
|
|||
ent->waterlevel = 0;
|
||||
ent->watertype = 0;
|
||||
ent->flags &= ~FL_NO_KNOCKBACK;
|
||||
ent->svflags &= ~SVF_DEADMONSTER;
|
||||
ent->svflags = 0;
|
||||
|
||||
VectorCopy (mins, ent->mins);
|
||||
VectorCopy (maxs, ent->maxs);
|
||||
|
@ -1217,7 +1210,9 @@ void PutClientInServer (edict_t *ent)
|
|||
|
||||
// set the delta angle
|
||||
for (i=0 ; i<3 ; i++)
|
||||
{
|
||||
client->ps.pmove.delta_angles[i] = ANGLE2SHORT(spawn_angles[i] - client->resp.cmd_angles[i]);
|
||||
}
|
||||
|
||||
ent->s.angles[PITCH] = 0;
|
||||
ent->s.angles[YAW] = spawn_angles[YAW];
|
||||
|
@ -1358,7 +1353,7 @@ void ClientUserinfoChanged (edict_t *ent, char *userinfo)
|
|||
// set skin
|
||||
s = Info_ValueForKey (userinfo, "skin");
|
||||
|
||||
zCam_SetLocalCopy(ent, s);
|
||||
zCam_SetLocalCopy(ent, s);
|
||||
|
||||
playernum = ent-g_edicts-1;
|
||||
|
||||
|
@ -1440,6 +1435,7 @@ qboolean ClientConnect (edict_t *ent, char *userinfo)
|
|||
if (game.maxclients > 1)
|
||||
gi.dprintf ("%s connected\n", ent->client->pers.netname);
|
||||
|
||||
ent->svflags = 0; // make sure we start with known default
|
||||
ent->client->pers.connected = true;
|
||||
return true;
|
||||
}
|
||||
|
@ -1510,15 +1506,6 @@ void PrintPmove (pmove_t *pm)
|
|||
Com_Printf ("sv %3i:%i %i\n", pm->cmd.impulse, c1, c2);
|
||||
}
|
||||
|
||||
|
||||
#if defined(_DEBUG) && defined(_Z_TESTMODE)
|
||||
|
||||
extern edict_t *testItemDroped;
|
||||
extern qboolean testitemOriginMove;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
==============
|
||||
ClientThink
|
||||
|
@ -1534,24 +1521,6 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
|
|||
int i, j;
|
||||
pmove_t pm;
|
||||
|
||||
#if defined(_DEBUG) && defined(_Z_TESTMODE)
|
||||
|
||||
if(testitemOriginMove && testItemDroped)
|
||||
{
|
||||
if(ucmd->forwardmove > 0)
|
||||
{
|
||||
testItemDroped->s.origin[2]++;
|
||||
}
|
||||
else if(ucmd->forwardmove < 0)
|
||||
{
|
||||
testItemDroped->s.origin[2]--;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
level.current_entity = ent;
|
||||
client = ent->client;
|
||||
|
||||
|
@ -1597,7 +1566,6 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
|
|||
if (memcmp(&client->old_pmove, &pm.s, sizeof(pm.s)))
|
||||
{
|
||||
pm.snapinitial = true;
|
||||
// gi.dprintf ("pmove changed!\n");
|
||||
}
|
||||
|
||||
pm.cmd = *ucmd;
|
||||
|
@ -1750,3 +1718,4 @@ void ClientBeginServerFrame (edict_t *ent)
|
|||
|
||||
client->latched_buttons = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -364,6 +364,8 @@ void G_SetStats (edict_t *ent)
|
|||
int index, cells;
|
||||
int power_armor_type;
|
||||
|
||||
cells = 0;
|
||||
|
||||
//
|
||||
// health
|
||||
//
|
||||
|
@ -385,6 +387,8 @@ void G_SetStats (edict_t *ent)
|
|||
ent->client->ps.stats[STAT_AMMO] = ent->client->pers.inventory[ent->client->ammo_index];
|
||||
}
|
||||
|
||||
cells = 0;
|
||||
|
||||
//
|
||||
// armor
|
||||
//
|
||||
|
|
|
@ -125,3 +125,4 @@ edict_t *PlayerTrail_LastSpot (void)
|
|||
{
|
||||
return trail[PREV(trail_head)];
|
||||
}
|
||||
|
||||
|
|
116
src/p_view.c
116
src/p_view.c
|
@ -209,7 +209,7 @@ void SV_CalcViewOffset (edict_t *ent)
|
|||
vec3_t v;
|
||||
|
||||
|
||||
//===================================
|
||||
//===================================
|
||||
|
||||
// base angles
|
||||
angles = ent->client->ps.kick_angles;
|
||||
|
@ -270,7 +270,7 @@ void SV_CalcViewOffset (edict_t *ent)
|
|||
angles[ROLL] += delta;
|
||||
}
|
||||
|
||||
//===================================
|
||||
//===================================
|
||||
|
||||
// base origin
|
||||
|
||||
|
@ -302,67 +302,66 @@ void SV_CalcViewOffset (edict_t *ent)
|
|||
// absolutely bound offsets
|
||||
// so the view can never be outside the player box
|
||||
|
||||
if(ent->client->zCameraTrack)
|
||||
{
|
||||
int i;
|
||||
|
||||
VectorAdd(ent->client->zCameraTrack->s.origin, ent->client->zCameraOffset, v);
|
||||
|
||||
if(ent->client->zCameraTrack->client)
|
||||
{
|
||||
vec3_t f;
|
||||
|
||||
VectorAdd(ent->client->zCameraTrack->client->ps.viewoffset, v, v);
|
||||
// AngleVectors (ent->client->zCameraTrack->client->v_angle, f, NULL, NULL);
|
||||
AngleVectors (ent->client->zCameraTrack->s.angles, f, NULL, NULL);
|
||||
VectorMA(v, 10, f, v);
|
||||
}
|
||||
else if (Q_stricmp(ent->client->zCameraTrack->classname, "misc_securitycamera") == 0)
|
||||
if(ent->client->zCameraTrack)
|
||||
{
|
||||
float framepercent = sin(((float)(level.framenum & 63) / 64.0) * M_PI * 2);
|
||||
VectorCopy(ent->client->zCameraTrack->move_origin, v);
|
||||
VectorCopy(ent->client->zCameraTrack->move_angles, ent->client->ps.viewangles);
|
||||
|
||||
// adjust yaw a bit due to sway
|
||||
ent->client->ps.viewangles[YAW] += framepercent * 15;
|
||||
int i;
|
||||
|
||||
VectorAdd(ent->client->zCameraTrack->s.origin, ent->client->zCameraOffset, v);
|
||||
|
||||
if(ent->client->zCameraTrack->client)
|
||||
{
|
||||
vec3_t f;
|
||||
|
||||
VectorAdd(ent->client->zCameraTrack->client->ps.viewoffset, v, v);
|
||||
AngleVectors (ent->client->zCameraTrack->s.angles, f, NULL, NULL);
|
||||
VectorMA(v, 10, f, v);
|
||||
}
|
||||
else if (Q_stricmp(ent->client->zCameraTrack->classname, "misc_securitycamera") == 0)
|
||||
{
|
||||
float framepercent = sin(((float)(level.framenum & 63) / 64.0) * M_PI * 2);
|
||||
VectorCopy(ent->client->zCameraTrack->move_origin, v);
|
||||
VectorCopy(ent->client->zCameraTrack->move_angles, ent->client->ps.viewangles);
|
||||
|
||||
// adjust yaw a bit due to sway
|
||||
ent->client->ps.viewangles[YAW] += framepercent * 15;
|
||||
}
|
||||
else
|
||||
VectorCopy (ent->client->zCameraTrack->s.angles, ent->client->ps.viewangles);
|
||||
|
||||
for(i = 0; i < 3; i++)
|
||||
{
|
||||
ent->client->ps.pmove.origin[i] = v[i] * 8;
|
||||
}
|
||||
|
||||
VectorSet (ent->client->ps.viewoffset, 0, 0, 0);
|
||||
// make our "double" do what we're doing
|
||||
if (ent->client->zCameraLocalEntity)
|
||||
{
|
||||
edict_t *e = ent->client->zCameraLocalEntity;
|
||||
VectorCopy(ent->s.origin, e->s.origin);
|
||||
e->s.frame = ent->s.frame;
|
||||
e->s.modelindex = ent->s.modelindex;
|
||||
e->s.modelindex2 = ent->s.modelindex2;
|
||||
e->s.skinnum = ent->s.skinnum;
|
||||
}
|
||||
}
|
||||
else
|
||||
VectorCopy (ent->client->zCameraTrack->s.angles, ent->client->ps.viewangles);
|
||||
|
||||
for(i = 0; i < 3; i++)
|
||||
{
|
||||
ent->client->ps.pmove.origin[i] = v[i] * 8;
|
||||
}
|
||||
if (v[0] < -14)
|
||||
v[0] = -14;
|
||||
else if (v[0] > 14)
|
||||
v[0] = 14;
|
||||
if (v[1] < -14)
|
||||
v[1] = -14;
|
||||
else if (v[1] > 14)
|
||||
v[1] = 14;
|
||||
if (v[2] < -22)
|
||||
v[2] = -22;
|
||||
else if (v[2] > 30)
|
||||
v[2] = 30;
|
||||
|
||||
VectorSet (ent->client->ps.viewoffset, 0, 0, 0);
|
||||
// make our "double" do what we're doing
|
||||
if (ent->client->zCameraLocalEntity)
|
||||
{
|
||||
edict_t *e = ent->client->zCameraLocalEntity;
|
||||
VectorCopy(ent->s.origin, e->s.origin);
|
||||
e->s.frame = ent->s.frame;
|
||||
e->s.modelindex = ent->s.modelindex;
|
||||
e->s.modelindex2 = ent->s.modelindex2;
|
||||
e->s.skinnum = ent->s.skinnum;
|
||||
VectorCopy (v, ent->client->ps.viewoffset);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (v[0] < -14)
|
||||
v[0] = -14;
|
||||
else if (v[0] > 14)
|
||||
v[0] = 14;
|
||||
if (v[1] < -14)
|
||||
v[1] = -14;
|
||||
else if (v[1] > 14)
|
||||
v[1] = 14;
|
||||
if (v[2] < -22)
|
||||
v[2] = -22;
|
||||
else if (v[2] > 30)
|
||||
v[2] = 30;
|
||||
|
||||
VectorCopy (v, ent->client->ps.viewoffset);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -416,7 +415,6 @@ void SV_CalcGunOffset (edict_t *ent)
|
|||
|
||||
// gun height
|
||||
VectorClear (ent->client->ps.gunoffset);
|
||||
// ent->ps->gunorigin[2] += bob;
|
||||
|
||||
// gun_x / gun_y / gun_z are development tools
|
||||
for (i=0 ; i<3 ; i++)
|
||||
|
@ -848,9 +846,7 @@ void G_SetClientEffects (edict_t *ent)
|
|||
VectorCopy (ent->s.angles, ent->client->zCameraLocalEntity->s.angles);
|
||||
VectorCopy (ent->s.old_origin, ent->client->zCameraLocalEntity->s.old_origin);
|
||||
|
||||
// ent->client->zCameraLocalEntity->s.frame = ent->s.frame;
|
||||
ent->client->zCameraLocalEntity->s.effects = ent->s.effects;
|
||||
// ent->client->zCameraLocalEntity->s.renderfx |= RF_CUSTOMSKIN;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
qboolean is_quad;
|
||||
byte is_silenced;
|
||||
|
||||
|
||||
void playQuadSound(edict_t *ent)
|
||||
{
|
||||
if (ent->client->quad_framenum > level.framenum)
|
||||
|
@ -472,13 +471,6 @@ void Weapon_Generic (edict_t *ent, int FRAME_ACTIVATE_LAST, int FRAME_FIRE_LAST,
|
|||
{
|
||||
if (ent->client->ps.gunframe == fire_frames[n])
|
||||
{
|
||||
#if 0
|
||||
// TODO move to each of weapon firing functions so that the quad
|
||||
// sound is only played when we actually want it to, instead of
|
||||
// every firing frame
|
||||
if (ent->client->quad_framenum > level.framenum)
|
||||
gi.sound(ent, CHAN_ITEM, gi.soundindex("items/damage3.wav"), 1, ATTN_NORM, 0);
|
||||
#endif
|
||||
fire (ent);
|
||||
break;
|
||||
}
|
||||
|
@ -658,14 +650,14 @@ void weapon_grenadelauncher_fire (edict_t *ent)
|
|||
int damage;
|
||||
float radius;
|
||||
|
||||
if(GetItemByIndex(ent->client->ammo_index)->tag == AMMO_GRENADES)
|
||||
{
|
||||
damage = 120;
|
||||
}
|
||||
else
|
||||
{
|
||||
damage = 300;
|
||||
}
|
||||
if(GetItemByIndex(ent->client->ammo_index)->tag == AMMO_GRENADES)
|
||||
{
|
||||
damage = 120;
|
||||
}
|
||||
else
|
||||
{
|
||||
damage = 300;
|
||||
}
|
||||
|
||||
radius = damage+40;
|
||||
if (is_quad)
|
||||
|
@ -738,10 +730,10 @@ void Weapon_RocketLauncher_Fire (edict_t *ent)
|
|||
VectorSet(offset, 8, 8, ent->viewheight-8);
|
||||
P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start);
|
||||
|
||||
if(EMPNukeCheck(ent, start))
|
||||
{
|
||||
if(EMPNukeCheck(ent, start))
|
||||
{
|
||||
gi.sound (ent, CHAN_AUTO, gi.soundindex("items/empnuke/emp_missfire.wav"), 1, ATTN_NORM, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! ( (int)dmflags->value & DF_INFINITE_AMMO ) )
|
||||
|
@ -1089,8 +1081,8 @@ void Chaingun_Fire (edict_t *ent)
|
|||
ent->client->kick_angles[i] = crandom() * 0.7;
|
||||
}
|
||||
|
||||
if(EMPNukeCheck(ent, ent->s.origin))
|
||||
{
|
||||
if(EMPNukeCheck(ent, ent->s.origin))
|
||||
{
|
||||
gi.sound (ent, CHAN_AUTO, gi.soundindex("items/empnuke/emp_missfire.wav"), 1, ATTN_NORM, 0);
|
||||
return;
|
||||
}
|
||||
|
@ -1108,7 +1100,7 @@ void Chaingun_Fire (edict_t *ent)
|
|||
P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start);
|
||||
|
||||
fire_bullet (ent, start, forward, damage, kick, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, MOD_CHAINGUN);
|
||||
}
|
||||
}
|
||||
|
||||
// send muzzle flash
|
||||
gi.WriteByte (svc_muzzleflash);
|
||||
|
@ -1299,11 +1291,11 @@ void weapon_railgun_fire (edict_t *ent)
|
|||
|
||||
ent->client->ps.gunframe++;
|
||||
|
||||
if(EMPNukeCheck(ent, start))
|
||||
{
|
||||
if(EMPNukeCheck(ent, start))
|
||||
{
|
||||
gi.sound (ent, CHAN_AUTO, gi.soundindex("items/empnuke/emp_missfire.wav"), 1, ATTN_NORM, 0);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (! ( (int)dmflags->value & DF_INFINITE_AMMO ) )
|
||||
ent->client->pers.inventory[ent->client->ammo_index]--;
|
||||
|
@ -1358,11 +1350,11 @@ void weapon_bfg_fire (edict_t *ent)
|
|||
ent->flags &= ~FL_BFGMISSFIRE;
|
||||
}
|
||||
|
||||
if(!(ent->flags & FL_BFGMISSFIRE) && EMPNukeCheck(ent, start))
|
||||
{
|
||||
if(!(ent->flags & FL_BFGMISSFIRE) && EMPNukeCheck(ent, start))
|
||||
{
|
||||
ent->flags |= FL_BFGMISSFIRE;
|
||||
gi.sound (ent, CHAN_AUTO, gi.soundindex("items/empnuke/emp_missfire.wav"), 1, ATTN_NORM, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if(ent->flags & FL_BFGMISSFIRE)
|
||||
{
|
||||
|
@ -1427,5 +1419,3 @@ void Weapon_BFG (edict_t *ent)
|
|||
Weapon_Generic (ent, 8, 32, 55, 58, pause_frames, fire_frames, weapon_bfg_fire);
|
||||
}
|
||||
|
||||
|
||||
//======================================================================
|
||||
|
|
Loading…
Reference in a new issue