mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 20:51:31 +00:00
CTF ist nun aufgeräumt
This commit is contained in:
parent
a7e02622ba
commit
273995acad
28 changed files with 309 additions and 539 deletions
4
Makefile
4
Makefile
|
@ -79,7 +79,7 @@ CFLAGS_OPENGL += -DBROKEN_GL -fPIC -Werror
|
||||||
|
|
||||||
# Game
|
# Game
|
||||||
CFLAGS_GAME = $(CFLAGS_BASE)
|
CFLAGS_GAME = $(CFLAGS_BASE)
|
||||||
CFLAGS_GAME += -fPIC
|
CFLAGS_GAME += -fPIC -Werror
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ GAMELDFLAGS = -shared
|
||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
|
|
||||||
all: client dedicated_server ref_gl baseq2
|
all: client dedicated_server ref_gl baseq2 ctf
|
||||||
|
|
||||||
client:
|
client:
|
||||||
@-mkdir -p build \
|
@-mkdir -p build \
|
||||||
|
|
|
@ -426,12 +426,12 @@ qboolean FindTarget (edict_t *self)
|
||||||
if (self->monsterinfo.aiflags & AI_COMBAT_POINT)
|
if (self->monsterinfo.aiflags & AI_COMBAT_POINT)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// if the first spawnflag bit is set, the monster will only wake up on
|
// if the first spawnflag bit is set, the monster will only wake up on
|
||||||
// really seeing the player, not another monster getting angry or hearing
|
// really seeing the player, not another monster getting angry or hearing
|
||||||
// something
|
// something
|
||||||
|
|
||||||
// revised behavior so they will wake up if they "see" a player make a noise
|
// revised behavior so they will wake up if they "see" a player make a noise
|
||||||
// but not weapon impact/explosion noises
|
// but not weapon impact/explosion noises
|
||||||
|
|
||||||
heardit = false;
|
heardit = false;
|
||||||
if ((level.sight_entity_framenum >= (level.framenum - 1)) && !(self->spawnflags & 1) )
|
if ((level.sight_entity_framenum >= (level.framenum - 1)) && !(self->spawnflags & 1) )
|
||||||
|
@ -493,7 +493,7 @@ qboolean FindTarget (edict_t *self)
|
||||||
if (r == RANGE_FAR)
|
if (r == RANGE_FAR)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// this is where we would check invisibility
|
// this is where we would check invisibility
|
||||||
|
|
||||||
// is client in an spot too dark to be seen?
|
// is client in an spot too dark to be seen?
|
||||||
if (client->light_level <= 5)
|
if (client->light_level <= 5)
|
||||||
|
@ -571,9 +571,9 @@ qboolean FindTarget (edict_t *self)
|
||||||
self->enemy = client;
|
self->enemy = client;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// got one
|
// got one
|
||||||
//
|
//
|
||||||
FoundTarget (self);
|
FoundTarget (self);
|
||||||
|
|
||||||
if (!(self->monsterinfo.aiflags & AI_SOUND_TARGET) && (self->monsterinfo.sight))
|
if (!(self->monsterinfo.aiflags & AI_SOUND_TARGET) && (self->monsterinfo.sight))
|
||||||
|
@ -638,7 +638,7 @@ qboolean M_CheckAttack (edict_t *self)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// missile attack
|
// missile attack
|
||||||
if (!self->monsterinfo.attack)
|
if (!self->monsterinfo.attack)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -773,7 +773,7 @@ qboolean ai_checkattack (edict_t *self, float dist)
|
||||||
vec3_t temp;
|
vec3_t temp;
|
||||||
qboolean hesDeadJim;
|
qboolean hesDeadJim;
|
||||||
|
|
||||||
// this causes monsters to run blindly to the combat point w/o firing
|
// this causes monsters to run blindly to the combat point w/o firing
|
||||||
if (self->goalentity)
|
if (self->goalentity)
|
||||||
{
|
{
|
||||||
if (self->monsterinfo.aiflags & AI_COMBAT_POINT)
|
if (self->monsterinfo.aiflags & AI_COMBAT_POINT)
|
||||||
|
@ -804,7 +804,7 @@ qboolean ai_checkattack (edict_t *self, float dist)
|
||||||
|
|
||||||
enemy_vis = false;
|
enemy_vis = false;
|
||||||
|
|
||||||
// see if the enemy is dead
|
// see if the enemy is dead
|
||||||
hesDeadJim = false;
|
hesDeadJim = false;
|
||||||
if ((!self->enemy) || (!self->enemy->inuse))
|
if ((!self->enemy) || (!self->enemy->inuse))
|
||||||
{
|
{
|
||||||
|
@ -835,7 +835,7 @@ qboolean ai_checkattack (edict_t *self, float dist)
|
||||||
if (hesDeadJim)
|
if (hesDeadJim)
|
||||||
{
|
{
|
||||||
self->enemy = NULL;
|
self->enemy = NULL;
|
||||||
// FIXME: look all around for other targets
|
// FIXME: look all around for other targets
|
||||||
if (self->oldenemy && self->oldenemy->health > 0)
|
if (self->oldenemy && self->oldenemy->health > 0)
|
||||||
{
|
{
|
||||||
self->enemy = self->oldenemy;
|
self->enemy = self->oldenemy;
|
||||||
|
@ -864,7 +864,7 @@ qboolean ai_checkattack (edict_t *self, float dist)
|
||||||
|
|
||||||
self->show_hostile = level.time + 1; // wake up other monsters
|
self->show_hostile = level.time + 1; // wake up other monsters
|
||||||
|
|
||||||
// check knowledge of enemy
|
// check knowledge of enemy
|
||||||
enemy_vis = visible(self, self->enemy);
|
enemy_vis = visible(self, self->enemy);
|
||||||
if (enemy_vis)
|
if (enemy_vis)
|
||||||
{
|
{
|
||||||
|
@ -872,21 +872,12 @@ qboolean ai_checkattack (edict_t *self, float dist)
|
||||||
VectorCopy (self->enemy->s.origin, self->monsterinfo.last_sighting);
|
VectorCopy (self->enemy->s.origin, self->monsterinfo.last_sighting);
|
||||||
}
|
}
|
||||||
|
|
||||||
// look for other coop players here
|
|
||||||
// if (coop && self->monsterinfo.search_time < level.time)
|
|
||||||
// {
|
|
||||||
// if (FindTarget (self))
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
enemy_infront = infront(self, self->enemy);
|
enemy_infront = infront(self, self->enemy);
|
||||||
enemy_range = range(self, self->enemy);
|
enemy_range = range(self, self->enemy);
|
||||||
VectorSubtract (self->enemy->s.origin, self->s.origin, temp);
|
VectorSubtract (self->enemy->s.origin, self->s.origin, temp);
|
||||||
enemy_yaw = vectoyaw(temp);
|
enemy_yaw = vectoyaw(temp);
|
||||||
|
|
||||||
|
|
||||||
// JDC self->ideal_yaw = enemy_yaw;
|
|
||||||
|
|
||||||
if (self->monsterinfo.attack_state == AS_MISSILE)
|
if (self->monsterinfo.attack_state == AS_MISSILE)
|
||||||
{
|
{
|
||||||
ai_run_missile (self);
|
ai_run_missile (self);
|
||||||
|
@ -960,8 +951,6 @@ void ai_run (edict_t *self, float dist)
|
||||||
|
|
||||||
if (enemy_vis)
|
if (enemy_vis)
|
||||||
{
|
{
|
||||||
// if (self.aiflags & AI_LOST_SIGHT)
|
|
||||||
// dprint("regained sight\n");
|
|
||||||
M_MoveToGoal (self, dist);
|
M_MoveToGoal (self, dist);
|
||||||
self->monsterinfo.aiflags &= ~AI_LOST_SIGHT;
|
self->monsterinfo.aiflags &= ~AI_LOST_SIGHT;
|
||||||
VectorCopy (self->enemy->s.origin, self->monsterinfo.last_sighting);
|
VectorCopy (self->enemy->s.origin, self->monsterinfo.last_sighting);
|
||||||
|
@ -980,7 +969,6 @@ void ai_run (edict_t *self, float dist)
|
||||||
{
|
{
|
||||||
M_MoveToGoal (self, dist);
|
M_MoveToGoal (self, dist);
|
||||||
self->monsterinfo.search_time = 0;
|
self->monsterinfo.search_time = 0;
|
||||||
// dprint("search timeout\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -993,7 +981,6 @@ void ai_run (edict_t *self, float dist)
|
||||||
if (!(self->monsterinfo.aiflags & AI_LOST_SIGHT))
|
if (!(self->monsterinfo.aiflags & AI_LOST_SIGHT))
|
||||||
{
|
{
|
||||||
// just lost sight of the player, decide where to go first
|
// just lost sight of the player, decide where to go first
|
||||||
// dprint("lost sight of player, last seen at "); dprint(vtos(self.last_sighting)); dprint("\n");
|
|
||||||
self->monsterinfo.aiflags |= (AI_LOST_SIGHT | AI_PURSUIT_LAST_SEEN);
|
self->monsterinfo.aiflags |= (AI_LOST_SIGHT | AI_PURSUIT_LAST_SEEN);
|
||||||
self->monsterinfo.aiflags &= ~(AI_PURSUE_NEXT | AI_PURSUE_TEMP);
|
self->monsterinfo.aiflags &= ~(AI_PURSUE_NEXT | AI_PURSUE_TEMP);
|
||||||
new = true;
|
new = true;
|
||||||
|
@ -1002,14 +989,12 @@ void ai_run (edict_t *self, float dist)
|
||||||
if (self->monsterinfo.aiflags & AI_PURSUE_NEXT)
|
if (self->monsterinfo.aiflags & AI_PURSUE_NEXT)
|
||||||
{
|
{
|
||||||
self->monsterinfo.aiflags &= ~AI_PURSUE_NEXT;
|
self->monsterinfo.aiflags &= ~AI_PURSUE_NEXT;
|
||||||
// dprint("reached current goal: "); dprint(vtos(self.origin)); dprint(" "); dprint(vtos(self.last_sighting)); dprint(" "); dprint(ftos(vlen(self.origin - self.last_sighting))); dprint("\n");
|
|
||||||
|
|
||||||
// give ourself more time since we got this far
|
// give ourself more time since we got this far
|
||||||
self->monsterinfo.search_time = level.time + 5;
|
self->monsterinfo.search_time = level.time + 5;
|
||||||
|
|
||||||
if (self->monsterinfo.aiflags & AI_PURSUE_TEMP)
|
if (self->monsterinfo.aiflags & AI_PURSUE_TEMP)
|
||||||
{
|
{
|
||||||
// dprint("was temp goal; retrying original\n");
|
|
||||||
self->monsterinfo.aiflags &= ~AI_PURSUE_TEMP;
|
self->monsterinfo.aiflags &= ~AI_PURSUE_TEMP;
|
||||||
marker = NULL;
|
marker = NULL;
|
||||||
VectorCopy (self->monsterinfo.saved_goal, self->monsterinfo.last_sighting);
|
VectorCopy (self->monsterinfo.saved_goal, self->monsterinfo.last_sighting);
|
||||||
|
@ -1030,9 +1015,6 @@ void ai_run (edict_t *self, float dist)
|
||||||
VectorCopy (marker->s.origin, self->monsterinfo.last_sighting);
|
VectorCopy (marker->s.origin, self->monsterinfo.last_sighting);
|
||||||
self->monsterinfo.trail_time = marker->timestamp;
|
self->monsterinfo.trail_time = marker->timestamp;
|
||||||
self->s.angles[YAW] = self->ideal_yaw = marker->s.angles[YAW];
|
self->s.angles[YAW] = self->ideal_yaw = marker->s.angles[YAW];
|
||||||
// dprint("heading is "); dprint(ftos(self.ideal_yaw)); dprint("\n");
|
|
||||||
|
|
||||||
// debug_drawline(self.origin, self.last_sighting, 52);
|
|
||||||
new = true;
|
new = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1049,8 +1031,6 @@ void ai_run (edict_t *self, float dist)
|
||||||
|
|
||||||
if (new)
|
if (new)
|
||||||
{
|
{
|
||||||
// gi.dprintf("checking for course correction\n");
|
|
||||||
|
|
||||||
tr = gi.trace(self->s.origin, self->mins, self->maxs, self->monsterinfo.last_sighting, self, MASK_PLAYERSOLID);
|
tr = gi.trace(self->s.origin, self->mins, self->maxs, self->monsterinfo.last_sighting, self, MASK_PLAYERSOLID);
|
||||||
if (tr.fraction < 1)
|
if (tr.fraction < 1)
|
||||||
{
|
{
|
||||||
|
@ -1078,7 +1058,6 @@ void ai_run (edict_t *self, float dist)
|
||||||
{
|
{
|
||||||
VectorSet(v, d2 * left * 0.5, -16, 0);
|
VectorSet(v, d2 * left * 0.5, -16, 0);
|
||||||
G_ProjectSource (self->s.origin, v, v_forward, v_right, left_target);
|
G_ProjectSource (self->s.origin, v, v_forward, v_right, left_target);
|
||||||
// gi.dprintf("incomplete path, go part way and adjust again\n");
|
|
||||||
}
|
}
|
||||||
VectorCopy (self->monsterinfo.last_sighting, self->monsterinfo.saved_goal);
|
VectorCopy (self->monsterinfo.last_sighting, self->monsterinfo.saved_goal);
|
||||||
self->monsterinfo.aiflags |= AI_PURSUE_TEMP;
|
self->monsterinfo.aiflags |= AI_PURSUE_TEMP;
|
||||||
|
@ -1086,8 +1065,6 @@ void ai_run (edict_t *self, float dist)
|
||||||
VectorCopy (left_target, self->monsterinfo.last_sighting);
|
VectorCopy (left_target, self->monsterinfo.last_sighting);
|
||||||
VectorSubtract (self->goalentity->s.origin, self->s.origin, v);
|
VectorSubtract (self->goalentity->s.origin, self->s.origin, v);
|
||||||
self->s.angles[YAW] = self->ideal_yaw = vectoyaw(v);
|
self->s.angles[YAW] = self->ideal_yaw = vectoyaw(v);
|
||||||
// gi.dprintf("adjusted left\n");
|
|
||||||
// debug_drawline(self.origin, self.last_sighting, 152);
|
|
||||||
}
|
}
|
||||||
else if (right >= center && right > left)
|
else if (right >= center && right > left)
|
||||||
{
|
{
|
||||||
|
@ -1095,7 +1072,6 @@ void ai_run (edict_t *self, float dist)
|
||||||
{
|
{
|
||||||
VectorSet(v, d2 * right * 0.5, 16, 0);
|
VectorSet(v, d2 * right * 0.5, 16, 0);
|
||||||
G_ProjectSource (self->s.origin, v, v_forward, v_right, right_target);
|
G_ProjectSource (self->s.origin, v, v_forward, v_right, right_target);
|
||||||
// gi.dprintf("incomplete path, go part way and adjust again\n");
|
|
||||||
}
|
}
|
||||||
VectorCopy (self->monsterinfo.last_sighting, self->monsterinfo.saved_goal);
|
VectorCopy (self->monsterinfo.last_sighting, self->monsterinfo.saved_goal);
|
||||||
self->monsterinfo.aiflags |= AI_PURSUE_TEMP;
|
self->monsterinfo.aiflags |= AI_PURSUE_TEMP;
|
||||||
|
@ -1103,11 +1079,8 @@ void ai_run (edict_t *self, float dist)
|
||||||
VectorCopy (right_target, self->monsterinfo.last_sighting);
|
VectorCopy (right_target, self->monsterinfo.last_sighting);
|
||||||
VectorSubtract (self->goalentity->s.origin, self->s.origin, v);
|
VectorSubtract (self->goalentity->s.origin, self->s.origin, v);
|
||||||
self->s.angles[YAW] = self->ideal_yaw = vectoyaw(v);
|
self->s.angles[YAW] = self->ideal_yaw = vectoyaw(v);
|
||||||
// gi.dprintf("adjusted right\n");
|
|
||||||
// debug_drawline(self.origin, self.last_sighting, 152);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// else gi.dprintf("course was fine\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
M_MoveToGoal (self, dist);
|
M_MoveToGoal (self, dist);
|
||||||
|
@ -1117,3 +1090,4 @@ void ai_run (edict_t *self, float dist)
|
||||||
if (self)
|
if (self)
|
||||||
self->goalentity = save;
|
self->goalentity = save;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -155,3 +155,4 @@ void ChasePrev(edict_t *ent)
|
||||||
ent->client->chase_target = e;
|
ent->client->chase_target = e;
|
||||||
ent->client->update_chase = true;
|
ent->client->update_chase = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ char *ClientTeam (edict_t *ent)
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if ((int)(dmflags->value) & DF_SKINTEAMS)
|
|
||||||
return ++p;
|
return ++p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +70,7 @@ void SelectNextItem (edict_t *ent, int itflags)
|
||||||
|
|
||||||
cl = ent->client;
|
cl = ent->client;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (cl->menu) {
|
if (cl->menu) {
|
||||||
PMenu_Next(ent);
|
PMenu_Next(ent);
|
||||||
return;
|
return;
|
||||||
|
@ -79,7 +78,7 @@ void SelectNextItem (edict_t *ent, int itflags)
|
||||||
ChaseNext(ent);
|
ChaseNext(ent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
// scan for the next valid one
|
// scan for the next valid one
|
||||||
for (i=1 ; i<=MAX_ITEMS ; i++)
|
for (i=1 ; i<=MAX_ITEMS ; i++)
|
||||||
|
@ -108,7 +107,7 @@ void SelectPrevItem (edict_t *ent, int itflags)
|
||||||
|
|
||||||
cl = ent->client;
|
cl = ent->client;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (cl->menu) {
|
if (cl->menu) {
|
||||||
PMenu_Prev(ent);
|
PMenu_Prev(ent);
|
||||||
return;
|
return;
|
||||||
|
@ -116,7 +115,7 @@ void SelectPrevItem (edict_t *ent, int itflags)
|
||||||
ChasePrev(ent);
|
ChasePrev(ent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
// scan for the next valid one
|
// scan for the next valid one
|
||||||
for (i=1 ; i<=MAX_ITEMS ; i++)
|
for (i=1 ; i<=MAX_ITEMS ; i++)
|
||||||
|
@ -445,12 +444,12 @@ void Cmd_Drop_f (edict_t *ent)
|
||||||
gitem_t *it;
|
gitem_t *it;
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
//ZOID--special case for tech powerups
|
//ZOID--special case for tech powerups
|
||||||
if (Q_stricmp(gi.args(), "tech") == 0 && (it = CTFWhat_Tech(ent)) != NULL) {
|
if (Q_stricmp(gi.args(), "tech") == 0 && (it = CTFWhat_Tech(ent)) != NULL) {
|
||||||
it->drop (ent, it);
|
it->drop (ent, it);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
s = gi.args();
|
s = gi.args();
|
||||||
it = FindItem (s);
|
it = FindItem (s);
|
||||||
|
@ -490,13 +489,13 @@ void Cmd_Inven_f (edict_t *ent)
|
||||||
cl->showscores = false;
|
cl->showscores = false;
|
||||||
cl->showhelp = false;
|
cl->showhelp = false;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ent->client->menu) {
|
if (ent->client->menu) {
|
||||||
PMenu_Close(ent);
|
PMenu_Close(ent);
|
||||||
ent->client->update_chase = true;
|
ent->client->update_chase = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
if (cl->showinventory)
|
if (cl->showinventory)
|
||||||
{
|
{
|
||||||
|
@ -504,12 +503,12 @@ void Cmd_Inven_f (edict_t *ent)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ctf->value && cl->resp.ctf_team == CTF_NOTEAM) {
|
if (ctf->value && cl->resp.ctf_team == CTF_NOTEAM) {
|
||||||
CTFOpenJoinMenu(ent);
|
CTFOpenJoinMenu(ent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
cl->showinventory = true;
|
cl->showinventory = true;
|
||||||
|
|
||||||
|
@ -530,12 +529,12 @@ void Cmd_InvUse_f (edict_t *ent)
|
||||||
{
|
{
|
||||||
gitem_t *it;
|
gitem_t *it;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ent->client->menu) {
|
if (ent->client->menu) {
|
||||||
PMenu_Select(ent);
|
PMenu_Select(ent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
ValidateSelectedItem (ent);
|
ValidateSelectedItem (ent);
|
||||||
|
|
||||||
|
@ -705,10 +704,10 @@ Cmd_Kill_f
|
||||||
*/
|
*/
|
||||||
void Cmd_Kill_f (edict_t *ent)
|
void Cmd_Kill_f (edict_t *ent)
|
||||||
{
|
{
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ent->solid == SOLID_NOT)
|
if (ent->solid == SOLID_NOT)
|
||||||
return;
|
return;
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
if((level.time - ent->client->respawn_time) < 5)
|
if((level.time - ent->client->respawn_time) < 5)
|
||||||
return;
|
return;
|
||||||
|
@ -728,11 +727,11 @@ void Cmd_PutAway_f (edict_t *ent)
|
||||||
ent->client->showscores = false;
|
ent->client->showscores = false;
|
||||||
ent->client->showhelp = false;
|
ent->client->showhelp = false;
|
||||||
ent->client->showinventory = false;
|
ent->client->showinventory = false;
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ent->client->menu)
|
if (ent->client->menu)
|
||||||
PMenu_Close(ent);
|
PMenu_Close(ent);
|
||||||
ent->client->update_chase = true;
|
ent->client->update_chase = true;
|
||||||
//ZOID
|
//ZOID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1031,7 +1030,7 @@ void ClientCommand (edict_t *ent)
|
||||||
Cmd_PutAway_f (ent);
|
Cmd_PutAway_f (ent);
|
||||||
else if (Q_stricmp (cmd, "wave") == 0)
|
else if (Q_stricmp (cmd, "wave") == 0)
|
||||||
Cmd_Wave_f (ent);
|
Cmd_Wave_f (ent);
|
||||||
//ZOID
|
//ZOID
|
||||||
else if (Q_stricmp (cmd, "team") == 0)
|
else if (Q_stricmp (cmd, "team") == 0)
|
||||||
{
|
{
|
||||||
CTFTeam_f (ent);
|
CTFTeam_f (ent);
|
||||||
|
@ -1060,7 +1059,8 @@ void ClientCommand (edict_t *ent)
|
||||||
} else if (Q_stricmp(cmd, "observer") == 0) {
|
} else if (Q_stricmp(cmd, "observer") == 0) {
|
||||||
CTFObserver(ent);
|
CTFObserver(ent);
|
||||||
}
|
}
|
||||||
//ZOID
|
//ZOID
|
||||||
else // anything that doesn't match a command will be a chat
|
else // anything that doesn't match a command will be a chat
|
||||||
Cmd_Say_f (ent, false, true);
|
Cmd_Say_f (ent, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ qboolean CanDamage (edict_t *targ, edict_t *inflictor)
|
||||||
vec3_t dest;
|
vec3_t dest;
|
||||||
trace_t trace;
|
trace_t trace;
|
||||||
|
|
||||||
// bmodels need special checking because their origin is 0,0,0
|
// bmodels need special checking because their origin is 0,0,0
|
||||||
if (targ->movetype == MOVETYPE_PUSH)
|
if (targ->movetype == MOVETYPE_PUSH)
|
||||||
{
|
{
|
||||||
VectorAdd (targ->absmin, targ->absmax, dest);
|
VectorAdd (targ->absmin, targ->absmax, dest);
|
||||||
|
@ -98,7 +98,6 @@ void Killed (edict_t *targ, edict_t *inflictor, edict_t *attacker, int damage, v
|
||||||
|
|
||||||
if ((targ->svflags & SVF_MONSTER) && (targ->deadflag != DEAD_DEAD))
|
if ((targ->svflags & SVF_MONSTER) && (targ->deadflag != DEAD_DEAD))
|
||||||
{
|
{
|
||||||
// targ->svflags |= SVF_DEADMONSTER; // now treat as a different content type
|
|
||||||
if (!(targ->monsterinfo.aiflags & AI_GOOD_GUY))
|
if (!(targ->monsterinfo.aiflags & AI_GOOD_GUY))
|
||||||
{
|
{
|
||||||
level.killed_monsters++;
|
level.killed_monsters++;
|
||||||
|
@ -137,7 +136,6 @@ void SpawnDamage (int type, vec3_t origin, vec3_t normal, int damage)
|
||||||
damage = 255;
|
damage = 255;
|
||||||
gi.WriteByte (svc_temp_entity);
|
gi.WriteByte (svc_temp_entity);
|
||||||
gi.WriteByte (type);
|
gi.WriteByte (type);
|
||||||
// gi.WriteByte (damage);
|
|
||||||
gi.WritePosition (origin);
|
gi.WritePosition (origin);
|
||||||
gi.WriteDir (normal);
|
gi.WriteDir (normal);
|
||||||
gi.multicast (origin, MULTICAST_PVS);
|
gi.multicast (origin, MULTICAST_PVS);
|
||||||
|
@ -360,15 +358,14 @@ void M_ReactToDamage (edict_t *targ, edict_t *attacker)
|
||||||
|
|
||||||
qboolean CheckTeamDamage (edict_t *targ, edict_t *attacker)
|
qboolean CheckTeamDamage (edict_t *targ, edict_t *attacker)
|
||||||
{
|
{
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ctf->value && targ->client && attacker->client)
|
if (ctf->value && targ->client && attacker->client)
|
||||||
if (targ->client->resp.ctf_team == attacker->client->resp.ctf_team &&
|
if (targ->client->resp.ctf_team == attacker->client->resp.ctf_team &&
|
||||||
targ != attacker)
|
targ != attacker)
|
||||||
return true;
|
return true;
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
//FIXME make the next line real and uncomment this block
|
//FIXME make the next line real and uncomment this block
|
||||||
// if ((ability to damage a teammate == OFF) && (targ's team == attacker's team))
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -416,19 +413,19 @@ void T_Damage (edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir,
|
||||||
|
|
||||||
VectorNormalize(dir);
|
VectorNormalize(dir);
|
||||||
|
|
||||||
// bonus damage for suprising a monster
|
// bonus damage for suprising a monster
|
||||||
if (!(dflags & DAMAGE_RADIUS) && (targ->svflags & SVF_MONSTER) && (attacker->client) && (!targ->enemy) && (targ->health > 0))
|
if (!(dflags & DAMAGE_RADIUS) && (targ->svflags & SVF_MONSTER) && (attacker->client) && (!targ->enemy) && (targ->health > 0))
|
||||||
damage *= 2;
|
damage *= 2;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
//strength tech
|
//strength tech
|
||||||
damage = CTFApplyStrength(attacker, damage);
|
damage = CTFApplyStrength(attacker, damage);
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
if (targ->flags & FL_NO_KNOCKBACK)
|
if (targ->flags & FL_NO_KNOCKBACK)
|
||||||
knockback = 0;
|
knockback = 0;
|
||||||
|
|
||||||
// figure momentum add
|
// figure momentum add
|
||||||
if (!(dflags & DAMAGE_NO_KNOCKBACK))
|
if (!(dflags & DAMAGE_NO_KNOCKBACK))
|
||||||
{
|
{
|
||||||
if ((knockback) && (targ->movetype != MOVETYPE_NONE) && (targ->movetype != MOVETYPE_BOUNCE) && (targ->movetype != MOVETYPE_PUSH) && (targ->movetype != MOVETYPE_STOP))
|
if ((knockback) && (targ->movetype != MOVETYPE_NONE) && (targ->movetype != MOVETYPE_BOUNCE) && (targ->movetype != MOVETYPE_PUSH) && (targ->movetype != MOVETYPE_STOP))
|
||||||
|
@ -473,17 +470,17 @@ void T_Damage (edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir,
|
||||||
save = damage;
|
save = damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
//team armor protect
|
//team armor protect
|
||||||
if (ctf->value && targ->client && attacker->client &&
|
if (ctf->value && targ->client && attacker->client &&
|
||||||
targ->client->resp.ctf_team == attacker->client->resp.ctf_team &&
|
targ->client->resp.ctf_team == attacker->client->resp.ctf_team &&
|
||||||
targ != attacker && ((int)dmflags->value & DF_ARMOR_PROTECT)) {
|
targ != attacker && ((int)dmflags->value & DF_ARMOR_PROTECT)) {
|
||||||
psave = asave = 0;
|
psave = asave = 0;
|
||||||
} else {
|
} else {
|
||||||
//ZOID
|
//ZOID
|
||||||
psave = CheckPowerArmor (targ, point, normal, take, dflags);
|
psave = CheckPowerArmor (targ, point, normal, take, dflags);
|
||||||
take -= psave;
|
take -= psave;
|
||||||
|
|
||||||
asave = CheckArmor (targ, point, normal, take, te_sparks, dflags);
|
asave = CheckArmor (targ, point, normal, take, te_sparks, dflags);
|
||||||
take -= asave;
|
take -= asave;
|
||||||
}
|
}
|
||||||
|
@ -491,20 +488,20 @@ void T_Damage (edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir,
|
||||||
//treat cheat/powerup savings the same as armor
|
//treat cheat/powerup savings the same as armor
|
||||||
asave += save;
|
asave += save;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
//resistance tech
|
//resistance tech
|
||||||
take = CTFApplyResistance(targ, take);
|
take = CTFApplyResistance(targ, take);
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
// team damage avoidance
|
// team damage avoidance
|
||||||
if (!(dflags & DAMAGE_NO_PROTECTION) && CheckTeamDamage (targ, attacker))
|
if (!(dflags & DAMAGE_NO_PROTECTION) && CheckTeamDamage (targ, attacker))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
CTFCheckHurtCarrier(targ, attacker);
|
CTFCheckHurtCarrier(targ, attacker);
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
// do the damage
|
// do the damage
|
||||||
if (take)
|
if (take)
|
||||||
{
|
{
|
||||||
if ((targ->svflags & SVF_MONSTER) || (client))
|
if ((targ->svflags & SVF_MONSTER) || (client))
|
||||||
|
@ -595,3 +592,4 @@ void T_RadiusDamage (edict_t *inflictor, edict_t *attacker, float damage, edict_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -259,10 +259,6 @@ static edict_t *loc_findradius (edict_t *from, vec3_t org, float rad)
|
||||||
{
|
{
|
||||||
if (!from->inuse)
|
if (!from->inuse)
|
||||||
continue;
|
continue;
|
||||||
#if 0
|
|
||||||
if (from->solid == SOLID_NOT)
|
|
||||||
continue;
|
|
||||||
#endif
|
|
||||||
for (j=0 ; j<3 ; j++)
|
for (j=0 ; j<3 ; j++)
|
||||||
eorg[j] = org[j] - (from->s.origin[j] + (from->mins[j] + from->maxs[j])*0.5);
|
eorg[j] = org[j] - (from->s.origin[j] + (from->mins[j] + from->maxs[j])*0.5);
|
||||||
if (VectorLength(eorg) > rad)
|
if (VectorLength(eorg) > rad)
|
||||||
|
@ -300,7 +296,7 @@ static qboolean loc_CanSee (edict_t *targ, edict_t *inflictor)
|
||||||
int i;
|
int i;
|
||||||
vec3_t viewpoint;
|
vec3_t viewpoint;
|
||||||
|
|
||||||
// bmodels need special checking because their origin is 0,0,0
|
// bmodels need special checking because their origin is 0,0,0
|
||||||
if (targ->movetype == MOVETYPE_PUSH)
|
if (targ->movetype == MOVETYPE_PUSH)
|
||||||
return false; // bmodels not supported
|
return false; // bmodels not supported
|
||||||
|
|
||||||
|
@ -441,7 +437,6 @@ void CTFAssignSkin(edict_t *ent, char *s)
|
||||||
va("%s\\%s", ent->client->pers.netname, s) );
|
va("%s\\%s", ent->client->pers.netname, s) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// gi.cprintf(ent, PRINT_HIGH, "You have been assigned to %s team.\n", ent->client->pers.netname);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTFAssignTeam(gclient_t *who)
|
void CTFAssignTeam(gclient_t *who)
|
||||||
|
@ -636,9 +631,7 @@ void CTFFragBonuses(edict_t *targ, edict_t *inflictor, edict_t *attacker)
|
||||||
}
|
}
|
||||||
|
|
||||||
// flag and flag carrier area defense bonuses
|
// flag and flag carrier area defense bonuses
|
||||||
|
|
||||||
// we have to find the flag and carrier entities
|
// we have to find the flag and carrier entities
|
||||||
|
|
||||||
// find the flag
|
// find the flag
|
||||||
switch (attacker->client->resp.ctf_team) {
|
switch (attacker->client->resp.ctf_team) {
|
||||||
case CTF_TEAM1:
|
case CTF_TEAM1:
|
||||||
|
@ -1343,46 +1336,15 @@ void CTFGrappleDrawCable(edict_t *self)
|
||||||
if (distance < 64)
|
if (distance < 64)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (distance > 256)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// check for min/max pitch
|
|
||||||
vectoangles (dir, angles);
|
|
||||||
if (angles[0] < -180)
|
|
||||||
angles[0] += 360;
|
|
||||||
if (fabs(angles[0]) > 45)
|
|
||||||
return;
|
|
||||||
|
|
||||||
trace_t tr; //!!
|
|
||||||
|
|
||||||
tr = gi.trace (start, NULL, NULL, self->s.origin, self, MASK_SHOT);
|
|
||||||
if (tr.ent != self) {
|
|
||||||
CTFResetGrapple(self);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// adjust start for beam origin being in middle of a segment
|
// adjust start for beam origin being in middle of a segment
|
||||||
// VectorMA (start, 8, f, start);
|
|
||||||
|
|
||||||
VectorCopy (self->s.origin, end);
|
VectorCopy (self->s.origin, end);
|
||||||
// adjust end z for end spot since the monster is currently dead
|
|
||||||
// end[2] = self->absmin[2] + self->size[2] / 2;
|
|
||||||
|
|
||||||
gi.WriteByte (svc_temp_entity);
|
gi.WriteByte (svc_temp_entity);
|
||||||
#if 1 //def USE_GRAPPLE_CABLE
|
|
||||||
gi.WriteByte (TE_GRAPPLE_CABLE);
|
gi.WriteByte (TE_GRAPPLE_CABLE);
|
||||||
gi.WriteShort (self->owner - g_edicts);
|
gi.WriteShort (self->owner - g_edicts);
|
||||||
gi.WritePosition (self->owner->s.origin);
|
gi.WritePosition (self->owner->s.origin);
|
||||||
gi.WritePosition (end);
|
gi.WritePosition (end);
|
||||||
gi.WritePosition (offset);
|
gi.WritePosition (offset);
|
||||||
#else
|
|
||||||
gi.WriteByte (TE_MEDIC_CABLE_ATTACK);
|
|
||||||
gi.WriteShort (self - g_edicts);
|
|
||||||
gi.WritePosition (end);
|
|
||||||
gi.WritePosition (start);
|
|
||||||
#endif
|
|
||||||
gi.multicast (self->s.origin, MULTICAST_PVS);
|
gi.multicast (self->s.origin, MULTICAST_PVS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1485,11 +1447,8 @@ void CTFFireGrapple (edict_t *self, vec3_t start, vec3_t dir, int damage, int sp
|
||||||
VectorClear (grapple->mins);
|
VectorClear (grapple->mins);
|
||||||
VectorClear (grapple->maxs);
|
VectorClear (grapple->maxs);
|
||||||
grapple->s.modelindex = gi.modelindex ("models/weapons/grapple/hook/tris.md2");
|
grapple->s.modelindex = gi.modelindex ("models/weapons/grapple/hook/tris.md2");
|
||||||
// grapple->s.sound = gi.soundindex ("misc/lasfly.wav");
|
|
||||||
grapple->owner = self;
|
grapple->owner = self;
|
||||||
grapple->touch = CTFGrappleTouch;
|
grapple->touch = CTFGrappleTouch;
|
||||||
// grapple->nextthink = level.time + FRAMETIME;
|
|
||||||
// grapple->think = CTFGrappleThink;
|
|
||||||
grapple->dmg = damage;
|
grapple->dmg = damage;
|
||||||
self->client->ctf_grapple = grapple;
|
self->client->ctf_grapple = grapple;
|
||||||
self->client->ctf_grapplestate = CTF_GRAPPLE_STATE_FLY; // we're firing, not on hook
|
self->client->ctf_grapplestate = CTF_GRAPPLE_STATE_FLY; // we're firing, not on hook
|
||||||
|
@ -1514,7 +1473,6 @@ void CTFGrappleFire (edict_t *ent, vec3_t g_offset, int damage, int effect)
|
||||||
return; // it's already out
|
return; // it's already out
|
||||||
|
|
||||||
AngleVectors (ent->client->v_angle, forward, right, NULL);
|
AngleVectors (ent->client->v_angle, forward, right, NULL);
|
||||||
// VectorSet(offset, 24, 16, ent->viewheight-8+2);
|
|
||||||
VectorSet(offset, 24, 8, ent->viewheight-8+2);
|
VectorSet(offset, 24, 8, ent->viewheight-8+2);
|
||||||
VectorAdd (offset, g_offset, offset);
|
VectorAdd (offset, g_offset, offset);
|
||||||
P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start);
|
P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start);
|
||||||
|
@ -1527,15 +1485,6 @@ void CTFGrappleFire (edict_t *ent, vec3_t g_offset, int damage, int effect)
|
||||||
|
|
||||||
gi.sound (ent, CHAN_RELIABLE+CHAN_WEAPON, gi.soundindex("weapons/grapple/grfire.wav"), volume, ATTN_NORM, 0);
|
gi.sound (ent, CHAN_RELIABLE+CHAN_WEAPON, gi.soundindex("weapons/grapple/grfire.wav"), volume, ATTN_NORM, 0);
|
||||||
CTFFireGrapple (ent, start, forward, damage, CTF_GRAPPLE_SPEED, effect);
|
CTFFireGrapple (ent, start, forward, damage, CTF_GRAPPLE_SPEED, effect);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// send muzzle flash
|
|
||||||
gi.WriteByte (svc_muzzleflash);
|
|
||||||
gi.WriteShort (ent-g_edicts);
|
|
||||||
gi.WriteByte (MZ_BLASTER);
|
|
||||||
gi.multicast (ent->s.origin, MULTICAST_PVS);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
PlayerNoise(ent, start, PNOISE_WEAPON);
|
PlayerNoise(ent, start, PNOISE_WEAPON);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1625,7 +1574,6 @@ void CTFTeam_f (edict_t *ent)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
////
|
|
||||||
ent->svflags = 0;
|
ent->svflags = 0;
|
||||||
ent->flags &= ~FL_GODMODE;
|
ent->flags &= ~FL_GODMODE;
|
||||||
ent->client->resp.ctf_team = desired_team;
|
ent->client->resp.ctf_team = desired_team;
|
||||||
|
@ -1731,33 +1679,13 @@ void CTFScoreboardMessage (edict_t *ent, edict_t *killer)
|
||||||
if (i >= total[0] && i >= total[1])
|
if (i >= total[0] && i >= total[1])
|
||||||
break; // we're done
|
break; // we're done
|
||||||
|
|
||||||
#if 0 //ndef NEW_SCORE
|
|
||||||
// set up y
|
|
||||||
sprintf(entry, "yv %d ", 42 + i * 8);
|
|
||||||
if (maxsize - len > strlen(entry)) {
|
|
||||||
strcat(string, entry);
|
|
||||||
len = strlen(string);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
*entry = 0;
|
*entry = 0;
|
||||||
#endif
|
|
||||||
|
|
||||||
// left side
|
// left side
|
||||||
if (i < total[0]) {
|
if (i < total[0]) {
|
||||||
cl = &game.clients[sorted[0][i]];
|
cl = &game.clients[sorted[0][i]];
|
||||||
cl_ent = g_edicts + 1 + sorted[0][i];
|
cl_ent = g_edicts + 1 + sorted[0][i];
|
||||||
|
|
||||||
#if 0 //ndef NEW_SCORE
|
|
||||||
sprintf(entry+strlen(entry),
|
|
||||||
"xv 0 %s \"%3d %3d %-12.12s\" ",
|
|
||||||
(cl_ent == ent) ? "string2" : "string",
|
|
||||||
cl->resp.score,
|
|
||||||
(cl->ping > 999) ? 999 : cl->ping,
|
|
||||||
cl->pers.netname);
|
|
||||||
|
|
||||||
if (cl_ent->client->pers.inventory[ITEM_INDEX(flag2_item)])
|
|
||||||
strcat(entry, "xv 56 picn sbfctf2 ");
|
|
||||||
#else
|
|
||||||
sprintf(entry+strlen(entry),
|
sprintf(entry+strlen(entry),
|
||||||
"ctf 0 %d %d %d %d ",
|
"ctf 0 %d %d %d %d ",
|
||||||
42 + i * 8,
|
42 + i * 8,
|
||||||
|
@ -1768,7 +1696,6 @@ void CTFScoreboardMessage (edict_t *ent, edict_t *killer)
|
||||||
if (cl_ent->client->pers.inventory[ITEM_INDEX(flag2_item)])
|
if (cl_ent->client->pers.inventory[ITEM_INDEX(flag2_item)])
|
||||||
sprintf(entry + strlen(entry), "xv 56 yv %d picn sbfctf2 ",
|
sprintf(entry + strlen(entry), "xv 56 yv %d picn sbfctf2 ",
|
||||||
42 + i * 8);
|
42 + i * 8);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (maxsize - len > strlen(entry)) {
|
if (maxsize - len > strlen(entry)) {
|
||||||
strcat(string, entry);
|
strcat(string, entry);
|
||||||
|
@ -1782,19 +1709,6 @@ void CTFScoreboardMessage (edict_t *ent, edict_t *killer)
|
||||||
cl = &game.clients[sorted[1][i]];
|
cl = &game.clients[sorted[1][i]];
|
||||||
cl_ent = g_edicts + 1 + sorted[1][i];
|
cl_ent = g_edicts + 1 + sorted[1][i];
|
||||||
|
|
||||||
#if 0 //ndef NEW_SCORE
|
|
||||||
sprintf(entry+strlen(entry),
|
|
||||||
"xv 160 %s \"%3d %3d %-12.12s\" ",
|
|
||||||
(cl_ent == ent) ? "string2" : "string",
|
|
||||||
cl->resp.score,
|
|
||||||
(cl->ping > 999) ? 999 : cl->ping,
|
|
||||||
cl->pers.netname);
|
|
||||||
|
|
||||||
if (cl_ent->client->pers.inventory[ITEM_INDEX(flag1_item)])
|
|
||||||
strcat(entry, "xv 216 picn sbfctf1 ");
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
sprintf(entry+strlen(entry),
|
sprintf(entry+strlen(entry),
|
||||||
"ctf 160 %d %d %d %d ",
|
"ctf 160 %d %d %d %d ",
|
||||||
42 + i * 8,
|
42 + i * 8,
|
||||||
|
@ -1805,7 +1719,6 @@ void CTFScoreboardMessage (edict_t *ent, edict_t *killer)
|
||||||
if (cl_ent->client->pers.inventory[ITEM_INDEX(flag1_item)])
|
if (cl_ent->client->pers.inventory[ITEM_INDEX(flag1_item)])
|
||||||
sprintf(entry + strlen(entry), "xv 216 yv %d picn sbfctf1 ",
|
sprintf(entry + strlen(entry), "xv 216 yv %d picn sbfctf1 ",
|
||||||
42 + i * 8);
|
42 + i * 8);
|
||||||
#endif
|
|
||||||
if (maxsize - len > strlen(entry)) {
|
if (maxsize - len > strlen(entry)) {
|
||||||
strcat(string, entry);
|
strcat(string, entry);
|
||||||
len = strlen(string);
|
len = strlen(string);
|
||||||
|
@ -3530,16 +3443,15 @@ static void old_teleporter_touch (edict_t *self, edict_t *other, cplane_t *plane
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
CTFPlayerResetGrapple(other);
|
CTFPlayerResetGrapple(other);
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
// unlink to make sure it can't possibly interfere with KillBox
|
// unlink to make sure it can't possibly interfere with KillBox
|
||||||
gi.unlinkentity (other);
|
gi.unlinkentity (other);
|
||||||
|
|
||||||
VectorCopy (dest->s.origin, other->s.origin);
|
VectorCopy (dest->s.origin, other->s.origin);
|
||||||
VectorCopy (dest->s.origin, other->s.old_origin);
|
VectorCopy (dest->s.origin, other->s.old_origin);
|
||||||
// other->s.origin[2] += 10;
|
|
||||||
|
|
||||||
// clear the velocity and hold them in place briefly
|
// clear the velocity and hold them in place briefly
|
||||||
VectorClear (other->velocity);
|
VectorClear (other->velocity);
|
||||||
|
@ -3958,9 +3870,6 @@ void CTFOpenAdminMenu(edict_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// if (ent->client->menu)
|
|
||||||
// PMenu_Close(ent->client->menu);
|
|
||||||
|
|
||||||
PMenu_Open(ent, adminmenu, -1, sizeof(adminmenu) / sizeof(pmenu_t), NULL);
|
PMenu_Open(ent, adminmenu, -1, sizeof(adminmenu) / sizeof(pmenu_t), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4064,22 +3973,6 @@ void CTFPlayerList(edict_t *ent)
|
||||||
char text[1400];
|
char text[1400];
|
||||||
edict_t *e2;
|
edict_t *e2;
|
||||||
|
|
||||||
#if 0
|
|
||||||
*text = 0;
|
|
||||||
if (ctfgame.match == MATCH_SETUP) {
|
|
||||||
for (i = 1; i <= maxclients->value; i++) {
|
|
||||||
e2 = g_edicts + i;
|
|
||||||
if (!e2->inuse)
|
|
||||||
continue;
|
|
||||||
if (!e2->client->resp.ready && e2->client->resp.ctf_team != CTF_NOTEAM) {
|
|
||||||
sprintf(st, "%s is not ready.\n", e2->client->pers.netname);
|
|
||||||
if (strlen(text) + strlen(st) < sizeof(text) - 50)
|
|
||||||
strcat(text, st);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// number, name, connect time, ping, score, admin
|
// number, name, connect time, ping, score, admin
|
||||||
|
|
||||||
*text = 0;
|
*text = 0;
|
||||||
|
|
|
@ -453,9 +453,9 @@ void plat_spawn_inside_trigger (edict_t *ent)
|
||||||
edict_t *trigger;
|
edict_t *trigger;
|
||||||
vec3_t tmin, tmax;
|
vec3_t tmin, tmax;
|
||||||
|
|
||||||
//
|
//
|
||||||
// middle trigger
|
// middle trigger
|
||||||
//
|
//
|
||||||
trigger = G_Spawn();
|
trigger = G_Spawn();
|
||||||
trigger->touch = Touch_Plat_Center;
|
trigger->touch = Touch_Plat_Center;
|
||||||
trigger->movetype = MOVETYPE_NONE;
|
trigger->movetype = MOVETYPE_NONE;
|
||||||
|
@ -646,8 +646,6 @@ void SP_func_rotating (edict_t *ent)
|
||||||
if (!ent->dmg)
|
if (!ent->dmg)
|
||||||
ent->dmg = 2;
|
ent->dmg = 2;
|
||||||
|
|
||||||
// ent->moveinfo.sound_middle = "doors/hydro1.wav";
|
|
||||||
|
|
||||||
ent->use = rotating_use;
|
ent->use = rotating_use;
|
||||||
if (ent->dmg)
|
if (ent->dmg)
|
||||||
ent->blocked = rotating_blocked;
|
ent->blocked = rotating_blocked;
|
||||||
|
@ -1093,8 +1091,8 @@ void door_blocked (edict_t *self, edict_t *other)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
// if a door has a negative wait, it would never come back if blocked,
|
// if a door has a negative wait, it would never come back if blocked,
|
||||||
// so let it just squash the object to death real fast
|
// so let it just squash the object to death real fast
|
||||||
if (self->moveinfo.wait >= 0)
|
if (self->moveinfo.wait >= 0)
|
||||||
{
|
{
|
||||||
if (self->moveinfo.state == STATE_DOWN)
|
if (self->moveinfo.state == STATE_DOWN)
|
||||||
|
@ -1536,7 +1534,6 @@ void train_next (edict_t *self)
|
||||||
again:
|
again:
|
||||||
if (!self->target)
|
if (!self->target)
|
||||||
{
|
{
|
||||||
// gi.dprintf ("train_next: no next target\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1701,7 +1698,6 @@ void trigger_elevator_use (edict_t *self, edict_t *other, edict_t *activator)
|
||||||
|
|
||||||
if (self->movetarget->nextthink)
|
if (self->movetarget->nextthink)
|
||||||
{
|
{
|
||||||
// gi.dprintf("elevator busy\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,15 +126,15 @@ void DoRespawn (edict_t *ent)
|
||||||
|
|
||||||
master = ent->teammaster;
|
master = ent->teammaster;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
//in ctf, when we are weapons stay, only the master of a team of weapons
|
//in ctf, when we are weapons stay, only the master of a team of weapons
|
||||||
//is spawned
|
//is spawned
|
||||||
if (ctf->value &&
|
if (ctf->value &&
|
||||||
((int)dmflags->value & DF_WEAPONS_STAY) &&
|
((int)dmflags->value & DF_WEAPONS_STAY) &&
|
||||||
master->item && (master->item->flags & IT_WEAPON))
|
master->item && (master->item->flags & IT_WEAPON))
|
||||||
ent = master;
|
ent = master;
|
||||||
else {
|
else {
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
for (count = 0, ent = master; ent; ent = ent->chain, count++)
|
for (count = 0, ent = master; ent; ent = ent->chain, count++)
|
||||||
;
|
;
|
||||||
|
@ -384,7 +384,6 @@ void Use_Breather (edict_t *ent, gitem_t *item)
|
||||||
else
|
else
|
||||||
ent->client->breather_framenum = level.framenum + 300;
|
ent->client->breather_framenum = level.framenum + 300;
|
||||||
|
|
||||||
// gi.sound(ent, CHAN_ITEM, gi.soundindex("items/damage.wav"), 1, ATTN_NORM, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//======================================================================
|
//======================================================================
|
||||||
|
@ -399,7 +398,6 @@ void Use_Envirosuit (edict_t *ent, gitem_t *item)
|
||||||
else
|
else
|
||||||
ent->client->enviro_framenum = level.framenum + 300;
|
ent->client->enviro_framenum = level.framenum + 300;
|
||||||
|
|
||||||
// gi.sound(ent, CHAN_ITEM, gi.soundindex("items/damage.wav"), 1, ATTN_NORM, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//======================================================================
|
//======================================================================
|
||||||
|
@ -424,8 +422,6 @@ void Use_Silencer (edict_t *ent, gitem_t *item)
|
||||||
ent->client->pers.inventory[ITEM_INDEX(item)]--;
|
ent->client->pers.inventory[ITEM_INDEX(item)]--;
|
||||||
ValidateSelectedItem (ent);
|
ValidateSelectedItem (ent);
|
||||||
ent->client->silencer_shots += 30;
|
ent->client->silencer_shots += 30;
|
||||||
|
|
||||||
// gi.sound(ent, CHAN_ITEM, gi.soundindex("items/damage.wav"), 1, ATTN_NORM, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//======================================================================
|
//======================================================================
|
||||||
|
@ -542,9 +538,9 @@ void Drop_Ammo (edict_t *ent, gitem_t *item)
|
||||||
void MegaHealth_think (edict_t *self)
|
void MegaHealth_think (edict_t *self)
|
||||||
{
|
{
|
||||||
if (self->owner->health > self->owner->max_health
|
if (self->owner->health > self->owner->max_health
|
||||||
//ZOID
|
//ZOID
|
||||||
&& !CTFHasRegeneration(self->owner)
|
&& !CTFHasRegeneration(self->owner)
|
||||||
//ZOID
|
//ZOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
self->nextthink = level.time + 1;
|
self->nextthink = level.time + 1;
|
||||||
|
@ -564,17 +560,17 @@ qboolean Pickup_Health (edict_t *ent, edict_t *other)
|
||||||
if (other->health >= other->max_health)
|
if (other->health >= other->max_health)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (other->health >= 250 && ent->count > 25)
|
if (other->health >= 250 && ent->count > 25)
|
||||||
return false;
|
return false;
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
other->health += ent->count;
|
other->health += ent->count;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (other->health > 250 && ent->count > 25)
|
if (other->health > 250 && ent->count > 25)
|
||||||
other->health = 250;
|
other->health = 250;
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
if (!(ent->style & HEALTH_IGNORE_MAX))
|
if (!(ent->style & HEALTH_IGNORE_MAX))
|
||||||
{
|
{
|
||||||
|
@ -582,11 +578,11 @@ qboolean Pickup_Health (edict_t *ent, edict_t *other)
|
||||||
other->health = other->max_health;
|
other->health = other->max_health;
|
||||||
}
|
}
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if ((ent->style & HEALTH_TIMED)
|
if ((ent->style & HEALTH_TIMED)
|
||||||
&& !CTFHasRegeneration(other)
|
&& !CTFHasRegeneration(other)
|
||||||
//ZOID
|
//ZOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ent->think = MegaHealth_think;
|
ent->think = MegaHealth_think;
|
||||||
ent->nextthink = level.time + 5;
|
ent->nextthink = level.time + 5;
|
||||||
|
@ -1142,15 +1138,15 @@ void SpawnItem (edict_t *ent, gitem_t *item)
|
||||||
item->drop = NULL;
|
item->drop = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
//Don't spawn the flags unless enabled
|
//Don't spawn the flags unless enabled
|
||||||
if (!ctf->value &&
|
if (!ctf->value &&
|
||||||
(strcmp(ent->classname, "item_flag_team1") == 0 ||
|
(strcmp(ent->classname, "item_flag_team1") == 0 ||
|
||||||
strcmp(ent->classname, "item_flag_team2") == 0)) {
|
strcmp(ent->classname, "item_flag_team2") == 0)) {
|
||||||
G_FreeEdict(ent);
|
G_FreeEdict(ent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
ent->item = item;
|
ent->item = item;
|
||||||
ent->nextthink = level.time + 2 * FRAMETIME; // items start after other solids
|
ent->nextthink = level.time + 2 * FRAMETIME; // items start after other solids
|
||||||
|
@ -1160,13 +1156,13 @@ void SpawnItem (edict_t *ent, gitem_t *item)
|
||||||
if (ent->model)
|
if (ent->model)
|
||||||
gi.modelindex (ent->model);
|
gi.modelindex (ent->model);
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
//flags are server animated and have special handling
|
//flags are server animated and have special handling
|
||||||
if (strcmp(ent->classname, "item_flag_team1") == 0 ||
|
if (strcmp(ent->classname, "item_flag_team1") == 0 ||
|
||||||
strcmp(ent->classname, "item_flag_team2") == 0) {
|
strcmp(ent->classname, "item_flag_team2") == 0) {
|
||||||
ent->think = CTFFlagSetup;
|
ent->think = CTFFlagSetup;
|
||||||
}
|
}
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2444,3 +2440,4 @@ void SetItemNames (void)
|
||||||
power_screen_index = ITEM_INDEX(FindItem("Power Screen"));
|
power_screen_index = ITEM_INDEX(FindItem("Power Screen"));
|
||||||
power_shield_index = ITEM_INDEX(FindItem("Power Shield"));
|
power_shield_index = ITEM_INDEX(FindItem("Power Shield"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -510,10 +510,10 @@ extern int meansOfDeath;
|
||||||
|
|
||||||
extern edict_t *g_edicts;
|
extern edict_t *g_edicts;
|
||||||
|
|
||||||
#define FOFS(x) (int)&(((edict_t *)0)->x)
|
#define FOFS(x) (size_t)&(((edict_t *)0)->x)
|
||||||
#define STOFS(x) (int)&(((spawn_temp_t *)0)->x)
|
#define STOFS(x) (size_t)&(((spawn_temp_t *)0)->x)
|
||||||
#define LLOFS(x) (int)&(((level_locals_t *)0)->x)
|
#define LLOFS(x) (size_t)&(((level_locals_t *)0)->x)
|
||||||
#define CLOFS(x) (int)&(((gclient_t *)0)->x)
|
#define CLOFS(x) (size_t)&(((gclient_t *)0)->x)
|
||||||
|
|
||||||
#define random() ((rand () & 0x7fff) / ((float)0x7fff))
|
#define random() ((rand () & 0x7fff) / ((float)0x7fff))
|
||||||
#define crandom() (2.0 * (random() - 0.5))
|
#define crandom() (2.0 * (random() - 0.5))
|
||||||
|
@ -871,7 +871,7 @@ typedef struct
|
||||||
client_persistant_t coop_respawn; // what to set client->pers to on a respawn
|
client_persistant_t coop_respawn; // what to set client->pers to on a respawn
|
||||||
int enterframe; // level.framenum the client entered the game
|
int enterframe; // level.framenum the client entered the game
|
||||||
int score; // frags, etc
|
int score; // frags, etc
|
||||||
//ZOID
|
//ZOID
|
||||||
int ctf_team; // CTF team
|
int ctf_team; // CTF team
|
||||||
int ctf_state;
|
int ctf_state;
|
||||||
float ctf_lasthurtcarrier;
|
float ctf_lasthurtcarrier;
|
||||||
|
@ -884,7 +884,7 @@ typedef struct
|
||||||
qboolean ready;
|
qboolean ready;
|
||||||
qboolean admin;
|
qboolean admin;
|
||||||
struct ghost_s *ghost; // for ghost codes
|
struct ghost_s *ghost; // for ghost codes
|
||||||
//ZOID
|
//ZOID
|
||||||
vec3_t cmd_angles; // angles sent over in the last command
|
vec3_t cmd_angles; // angles sent over in the last command
|
||||||
int game_helpchanged;
|
int game_helpchanged;
|
||||||
int helpchanged;
|
int helpchanged;
|
||||||
|
@ -904,10 +904,10 @@ struct gclient_s
|
||||||
pmove_state_t old_pmove; // for detecting out-of-pmove changes
|
pmove_state_t old_pmove; // for detecting out-of-pmove changes
|
||||||
|
|
||||||
qboolean showscores; // set layout stat
|
qboolean showscores; // set layout stat
|
||||||
//ZOID
|
//ZOID
|
||||||
qboolean inmenu; // in menu
|
qboolean inmenu; // in menu
|
||||||
pmenuhnd_t *menu; // current menu
|
pmenuhnd_t *menu; // current menu
|
||||||
//ZOID
|
//ZOID
|
||||||
qboolean showinventory; // set layout stat
|
qboolean showinventory; // set layout stat
|
||||||
qboolean showhelp;
|
qboolean showhelp;
|
||||||
qboolean showhelpicon;
|
qboolean showhelpicon;
|
||||||
|
@ -976,7 +976,7 @@ struct gclient_s
|
||||||
|
|
||||||
float respawn_time; // can respawn when time > this
|
float respawn_time; // can respawn when time > this
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
void *ctf_grapple; // entity of grapple
|
void *ctf_grapple; // entity of grapple
|
||||||
int ctf_grapplestate; // true if pulling
|
int ctf_grapplestate; // true if pulling
|
||||||
float ctf_grapplereleasetime; // time of grapple release
|
float ctf_grapplereleasetime; // time of grapple release
|
||||||
|
@ -987,7 +987,7 @@ struct gclient_s
|
||||||
qboolean update_chase;
|
qboolean update_chase;
|
||||||
float menutime; // time to update menu
|
float menutime; // time to update menu
|
||||||
qboolean menudirty;
|
qboolean menudirty;
|
||||||
//ZOID
|
//ZOID
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -291,14 +291,14 @@ void CheckDMRules (void)
|
||||||
if (!deathmatch->value)
|
if (!deathmatch->value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ctf->value && CTFCheckRules()) {
|
if (ctf->value && CTFCheckRules()) {
|
||||||
EndDMLevel ();
|
EndDMLevel ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (CTFInMatch())
|
if (CTFInMatch())
|
||||||
return; // no checking in match mode
|
return; // no checking in match mode
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
if (timelimit->value)
|
if (timelimit->value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -308,18 +308,18 @@ void ThrowDebris (edict_t *self, char *modelname, float speed, vec3_t origin)
|
||||||
|
|
||||||
void BecomeExplosion1 (edict_t *self)
|
void BecomeExplosion1 (edict_t *self)
|
||||||
{
|
{
|
||||||
//ZOID
|
//ZOID
|
||||||
//flags are important
|
//flags are important
|
||||||
if (strcmp(self->classname, "item_flag_team1") == 0) {
|
if (strcmp(self->classname, "item_flag_team1") == 0) {
|
||||||
CTFResetFlag(CTF_TEAM1); // this will free self!
|
CTFResetFlag(CTF_TEAM1); // this will free self!
|
||||||
gi.bprintf(PRINT_HIGH, "The %s flag has returned!\n",
|
gi.bprintf(PRINT_HIGH, "The %s flag has returned!\n",
|
||||||
CTFTeamName(CTF_TEAM1));
|
CTFTeamName(CTF_TEAM1));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (strcmp(self->classname, "item_flag_team2") == 0) {
|
if (strcmp(self->classname, "item_flag_team2") == 0) {
|
||||||
CTFResetFlag(CTF_TEAM2); // this will free self!
|
CTFResetFlag(CTF_TEAM2); // this will free self!
|
||||||
gi.bprintf(PRINT_HIGH, "The %s flag has returned!\n",
|
gi.bprintf(PRINT_HIGH, "The %s flag has returned!\n",
|
||||||
CTFTeamName(CTF_TEAM1));
|
CTFTeamName(CTF_TEAM1));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// techs are important too
|
// techs are important too
|
||||||
|
@ -327,7 +327,7 @@ void BecomeExplosion1 (edict_t *self)
|
||||||
CTFRespawnTech(self); // this frees self!
|
CTFRespawnTech(self); // this frees self!
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
gi.WriteByte (svc_temp_entity);
|
gi.WriteByte (svc_temp_entity);
|
||||||
gi.WriteByte (TE_EXPLOSION1);
|
gi.WriteByte (TE_EXPLOSION1);
|
||||||
|
@ -510,9 +510,7 @@ static int robotron[4];
|
||||||
void TH_viewthing(edict_t *ent)
|
void TH_viewthing(edict_t *ent)
|
||||||
{
|
{
|
||||||
ent->s.frame = (ent->s.frame + 1) % 7;
|
ent->s.frame = (ent->s.frame + 1) % 7;
|
||||||
// ent->s.frame = (ent->s.frame + 1) % 9;
|
|
||||||
ent->nextthink = level.time + FRAMETIME;
|
ent->nextthink = level.time + FRAMETIME;
|
||||||
// return;
|
|
||||||
|
|
||||||
if (ent->spawnflags)
|
if (ent->spawnflags)
|
||||||
{
|
{
|
||||||
|
@ -533,7 +531,6 @@ void SP_viewthing(edict_t *ent)
|
||||||
ent->s.renderfx = RF_FRAMELERP;
|
ent->s.renderfx = RF_FRAMELERP;
|
||||||
VectorSet (ent->mins, -16, -16, -24);
|
VectorSet (ent->mins, -16, -16, -24);
|
||||||
VectorSet (ent->maxs, 16, 16, 32);
|
VectorSet (ent->maxs, 16, 16, 32);
|
||||||
// ent->s.modelindex = gi.modelindex ("models/player_y/tris.md2");
|
|
||||||
ent->s.modelindex = gi.modelindex ("models/objects/banner/tris.md2");
|
ent->s.modelindex = gi.modelindex ("models/objects/banner/tris.md2");
|
||||||
gi.linkentity (ent);
|
gi.linkentity (ent);
|
||||||
ent->nextthink = level.time + 0.5;
|
ent->nextthink = level.time + 0.5;
|
||||||
|
@ -659,7 +656,6 @@ void SP_func_wall (edict_t *self)
|
||||||
// it must be TRIGGER_SPAWN
|
// it must be TRIGGER_SPAWN
|
||||||
if (!(self->spawnflags & 1))
|
if (!(self->spawnflags & 1))
|
||||||
{
|
{
|
||||||
// gi.dprintf("func_wall missing TRIGGER_SPAWN\n");
|
|
||||||
self->spawnflags |= 1;
|
self->spawnflags |= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1049,12 +1045,6 @@ void SP_misc_explobox (edict_t *self)
|
||||||
|
|
||||||
void misc_blackhole_use (edict_t *ent, edict_t *other, edict_t *activator)
|
void misc_blackhole_use (edict_t *ent, edict_t *other, edict_t *activator)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
gi.WriteByte (svc_temp_entity);
|
|
||||||
gi.WriteByte (TE_BOSSTPORT);
|
|
||||||
gi.WritePosition (ent->s.origin);
|
|
||||||
gi.multicast (ent->s.origin, MULTICAST_PVS);
|
|
||||||
*/
|
|
||||||
G_FreeEdict (ent);
|
G_FreeEdict (ent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1823,9 +1813,9 @@ void teleporter_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
CTFPlayerResetGrapple(other);
|
CTFPlayerResetGrapple(other);
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
// unlink to make sure it can't possibly interfere with KillBox
|
// unlink to make sure it can't possibly interfere with KillBox
|
||||||
gi.unlinkentity (other);
|
gi.unlinkentity (other);
|
||||||
|
@ -1901,7 +1891,6 @@ void SP_misc_teleporter_dest (edict_t *ent)
|
||||||
gi.setmodel (ent, "models/objects/dmspot/tris.md2");
|
gi.setmodel (ent, "models/objects/dmspot/tris.md2");
|
||||||
ent->s.skinnum = 0;
|
ent->s.skinnum = 0;
|
||||||
ent->solid = SOLID_BBOX;
|
ent->solid = SOLID_BBOX;
|
||||||
// ent->s.effects |= EF_FLIES;
|
|
||||||
VectorSet (ent->mins, -32, -32, -24);
|
VectorSet (ent->mins, -32, -32, -24);
|
||||||
VectorSet (ent->maxs, 32, 32, -16);
|
VectorSet (ent->maxs, 32, 32, -16);
|
||||||
gi.linkentity (ent);
|
gi.linkentity (ent);
|
||||||
|
|
|
@ -152,7 +152,7 @@ void M_CheckGround (edict_t *ent)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the hull point one-quarter unit down is solid the entity is on ground
|
// if the hull point one-quarter unit down is solid the entity is on ground
|
||||||
point[0] = ent->s.origin[0];
|
point[0] = ent->s.origin[0];
|
||||||
point[1] = ent->s.origin[1];
|
point[1] = ent->s.origin[1];
|
||||||
point[2] = ent->s.origin[2] - 0.25;
|
point[2] = ent->s.origin[2] - 0.25;
|
||||||
|
@ -166,10 +166,6 @@ void M_CheckGround (edict_t *ent)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ent->groundentity = trace.ent;
|
|
||||||
// ent->groundentity_linkcount = trace.ent->linkcount;
|
|
||||||
// if (!trace.startsolid && !trace.allsolid)
|
|
||||||
// VectorCopy (trace.endpos, ent->s.origin);
|
|
||||||
if (!trace.startsolid && !trace.allsolid)
|
if (!trace.startsolid && !trace.allsolid)
|
||||||
{
|
{
|
||||||
VectorCopy (trace.endpos, ent->s.origin);
|
VectorCopy (trace.endpos, ent->s.origin);
|
||||||
|
@ -185,9 +181,9 @@ void M_CatagorizePosition (edict_t *ent)
|
||||||
vec3_t point;
|
vec3_t point;
|
||||||
int cont;
|
int cont;
|
||||||
|
|
||||||
//
|
//
|
||||||
// get waterlevel
|
// get waterlevel
|
||||||
//
|
//
|
||||||
point[0] = ent->s.origin[0];
|
point[0] = ent->s.origin[0];
|
||||||
point[1] = ent->s.origin[1];
|
point[1] = ent->s.origin[1];
|
||||||
point[2] = ent->s.origin[2] + ent->mins[2] + 1;
|
point[2] = ent->s.origin[2] + ent->mins[2] + 1;
|
||||||
|
@ -449,7 +445,7 @@ void monster_use (edict_t *self, edict_t *other, edict_t *activator)
|
||||||
if (!(activator->client) && !(activator->monsterinfo.aiflags & AI_GOOD_GUY))
|
if (!(activator->client) && !(activator->monsterinfo.aiflags & AI_GOOD_GUY))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// delay reaction so if the monster is teleported, its sound is still heard
|
// delay reaction so if the monster is teleported, its sound is still heard
|
||||||
self->enemy = activator;
|
self->enemy = activator;
|
||||||
FoundTarget (self);
|
FoundTarget (self);
|
||||||
}
|
}
|
||||||
|
@ -544,7 +540,6 @@ qboolean monster_start (edict_t *self)
|
||||||
{
|
{
|
||||||
self->spawnflags &= ~4;
|
self->spawnflags &= ~4;
|
||||||
self->spawnflags |= 1;
|
self->spawnflags |= 1;
|
||||||
// gi.dprintf("fixed spawnflags on %s at %s\n", self->classname, vtos(self->s.origin));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(self->monsterinfo.aiflags & AI_GOOD_GUY))
|
if (!(self->monsterinfo.aiflags & AI_GOOD_GUY))
|
||||||
|
@ -739,3 +734,4 @@ void swimmonster_start (edict_t *self)
|
||||||
self->think = swimmonster_start_go;
|
self->think = swimmonster_start_go;
|
||||||
monster_start (self);
|
monster_start (self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,9 +74,9 @@ void SV_CheckVelocity (edict_t *ent)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
//
|
//
|
||||||
// bound velocity
|
// bound velocity
|
||||||
//
|
//
|
||||||
for (i=0 ; i<3 ; i++)
|
for (i=0 ; i<3 ; i++)
|
||||||
{
|
{
|
||||||
if (ent->velocity[i] > sv_maxvelocity->value)
|
if (ent->velocity[i] > sv_maxvelocity->value)
|
||||||
|
@ -245,9 +245,9 @@ int SV_FlyMove (edict_t *ent, float time, int mask)
|
||||||
blocked |= 2; // step
|
blocked |= 2; // step
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// run the impact function
|
// run the impact function
|
||||||
//
|
//
|
||||||
SV_Impact (ent, &trace);
|
SV_Impact (ent, &trace);
|
||||||
if (!ent->inuse)
|
if (!ent->inuse)
|
||||||
break; // removed by the impact function
|
break; // removed by the impact function
|
||||||
|
@ -255,7 +255,7 @@ int SV_FlyMove (edict_t *ent, float time, int mask)
|
||||||
|
|
||||||
time_left -= time_left * trace.fraction;
|
time_left -= time_left * trace.fraction;
|
||||||
|
|
||||||
// cliped to another plane
|
// cliped to another plane
|
||||||
if (numplanes >= MAX_CLIP_PLANES)
|
if (numplanes >= MAX_CLIP_PLANES)
|
||||||
{ // this shouldn't really happen
|
{ // this shouldn't really happen
|
||||||
VectorCopy (vec3_origin, ent->velocity);
|
VectorCopy (vec3_origin, ent->velocity);
|
||||||
|
@ -265,9 +265,9 @@ int SV_FlyMove (edict_t *ent, float time, int mask)
|
||||||
VectorCopy (trace.plane.normal, planes[numplanes]);
|
VectorCopy (trace.plane.normal, planes[numplanes]);
|
||||||
numplanes++;
|
numplanes++;
|
||||||
|
|
||||||
//
|
//
|
||||||
// modify original_velocity so it parallels all of the clip planes
|
// modify original_velocity so it parallels all of the clip planes
|
||||||
//
|
//
|
||||||
for (i=0 ; i<numplanes ; i++)
|
for (i=0 ; i<numplanes ; i++)
|
||||||
{
|
{
|
||||||
ClipVelocity (original_velocity, planes[i], new_velocity, 1);
|
ClipVelocity (original_velocity, planes[i], new_velocity, 1);
|
||||||
|
@ -289,7 +289,6 @@ int SV_FlyMove (edict_t *ent, float time, int mask)
|
||||||
{ // go along the crease
|
{ // go along the crease
|
||||||
if (numplanes != 2)
|
if (numplanes != 2)
|
||||||
{
|
{
|
||||||
// gi.dprintf ("clip velocity, numplanes == %i\n",numplanes);
|
|
||||||
VectorCopy (vec3_origin, ent->velocity);
|
VectorCopy (vec3_origin, ent->velocity);
|
||||||
return 7;
|
return 7;
|
||||||
}
|
}
|
||||||
|
@ -298,10 +297,10 @@ int SV_FlyMove (edict_t *ent, float time, int mask)
|
||||||
VectorScale (dir, d, ent->velocity);
|
VectorScale (dir, d, ent->velocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// if original velocity is against the original velocity, stop dead
|
// if original velocity is against the original velocity, stop dead
|
||||||
// to avoid tiny occilations in sloping corners
|
// to avoid tiny occilations in sloping corners
|
||||||
//
|
//
|
||||||
if (DotProduct (ent->velocity, primal_velocity) <= 0)
|
if (DotProduct (ent->velocity, primal_velocity) <= 0)
|
||||||
{
|
{
|
||||||
VectorCopy (vec3_origin, ent->velocity);
|
VectorCopy (vec3_origin, ent->velocity);
|
||||||
|
@ -428,11 +427,11 @@ qboolean SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
||||||
maxs[i] = pusher->absmax[i] + move[i];
|
maxs[i] = pusher->absmax[i] + move[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
// we need this for pushing things later
|
// we need this for pushing things later
|
||||||
VectorSubtract (vec3_origin, amove, org);
|
VectorSubtract (vec3_origin, amove, org);
|
||||||
AngleVectors (org, forward, right, up);
|
AngleVectors (org, forward, right, up);
|
||||||
|
|
||||||
// save the pusher's original position
|
// save the pusher's original position
|
||||||
pushed_p->ent = pusher;
|
pushed_p->ent = pusher;
|
||||||
VectorCopy (pusher->s.origin, pushed_p->origin);
|
VectorCopy (pusher->s.origin, pushed_p->origin);
|
||||||
VectorCopy (pusher->s.angles, pushed_p->angles);
|
VectorCopy (pusher->s.angles, pushed_p->angles);
|
||||||
|
@ -440,12 +439,12 @@ qboolean SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
||||||
pushed_p->deltayaw = pusher->client->ps.pmove.delta_angles[YAW];
|
pushed_p->deltayaw = pusher->client->ps.pmove.delta_angles[YAW];
|
||||||
pushed_p++;
|
pushed_p++;
|
||||||
|
|
||||||
// move the pusher to it's final position
|
// move the pusher to it's final position
|
||||||
VectorAdd (pusher->s.origin, move, pusher->s.origin);
|
VectorAdd (pusher->s.origin, move, pusher->s.origin);
|
||||||
VectorAdd (pusher->s.angles, amove, pusher->s.angles);
|
VectorAdd (pusher->s.angles, amove, pusher->s.angles);
|
||||||
gi.linkentity (pusher);
|
gi.linkentity (pusher);
|
||||||
|
|
||||||
// see if any solid entities are inside the final position
|
// see if any solid entities are inside the final position
|
||||||
check = g_edicts+1;
|
check = g_edicts+1;
|
||||||
for (e = 1; e < globals.num_edicts; e++, check++)
|
for (e = 1; e < globals.num_edicts; e++, check++)
|
||||||
{
|
{
|
||||||
|
@ -460,7 +459,7 @@ qboolean SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
||||||
if (!check->area.prev)
|
if (!check->area.prev)
|
||||||
continue; // not linked in anywhere
|
continue; // not linked in anywhere
|
||||||
|
|
||||||
// if the entity is standing on the pusher, it will definitely be moved
|
// if the entity is standing on the pusher, it will definitely be moved
|
||||||
if (check->groundentity != pusher)
|
if (check->groundentity != pusher)
|
||||||
{
|
{
|
||||||
// see if the ent needs to be tested
|
// see if the ent needs to be tested
|
||||||
|
@ -543,7 +542,7 @@ qboolean SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//FIXME: is there a better way to handle this?
|
//FIXME: is there a better way to handle this?
|
||||||
// see if anything we moved has touched a trigger
|
// see if anything we moved has touched a trigger
|
||||||
for (p=pushed_p-1 ; p>=pushed ; p--)
|
for (p=pushed_p-1 ; p>=pushed ; p--)
|
||||||
G_TouchTriggers (p->ent);
|
G_TouchTriggers (p->ent);
|
||||||
|
@ -571,7 +570,6 @@ void SV_Physics_Pusher (edict_t *ent)
|
||||||
// make sure all team slaves can move before commiting
|
// make sure all team slaves can move before commiting
|
||||||
// any moves or calling any think functions
|
// any moves or calling any think functions
|
||||||
// if the move is blocked, all moved objects will be backed out
|
// if the move is blocked, all moved objects will be backed out
|
||||||
//retry:
|
|
||||||
pushed_p = pushed;
|
pushed_p = pushed;
|
||||||
for (part = ent ; part ; part=part->teamchain)
|
for (part = ent ; part ; part=part->teamchain)
|
||||||
{
|
{
|
||||||
|
@ -602,11 +600,6 @@ void SV_Physics_Pusher (edict_t *ent)
|
||||||
// otherwise, just stay in place until the obstacle is gone
|
// otherwise, just stay in place until the obstacle is gone
|
||||||
if (part->blocked)
|
if (part->blocked)
|
||||||
part->blocked (part, obstacle);
|
part->blocked (part, obstacle);
|
||||||
#if 0
|
|
||||||
// if the pushed entity went away and the pusher is still there
|
|
||||||
if (!obstacle->inuse && part->inuse)
|
|
||||||
goto retry;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -629,7 +622,7 @@ Non moving objects can only think
|
||||||
*/
|
*/
|
||||||
void SV_Physics_None (edict_t *ent)
|
void SV_Physics_None (edict_t *ent)
|
||||||
{
|
{
|
||||||
// regular thinking
|
// regular thinking
|
||||||
SV_RunThink (ent);
|
SV_RunThink (ent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -642,7 +635,7 @@ A moving object that doesn't obey physics
|
||||||
*/
|
*/
|
||||||
void SV_Physics_Noclip (edict_t *ent)
|
void SV_Physics_Noclip (edict_t *ent)
|
||||||
{
|
{
|
||||||
// regular thinking
|
// regular thinking
|
||||||
if (!SV_RunThink (ent))
|
if (!SV_RunThink (ent))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -677,7 +670,7 @@ void SV_Physics_Toss (edict_t *ent)
|
||||||
qboolean isinwater;
|
qboolean isinwater;
|
||||||
vec3_t old_origin;
|
vec3_t old_origin;
|
||||||
|
|
||||||
// regular thinking
|
// regular thinking
|
||||||
SV_RunThink (ent);
|
SV_RunThink (ent);
|
||||||
|
|
||||||
// if not a team captain, so movement will be handled elsewhere
|
// if not a team captain, so movement will be handled elsewhere
|
||||||
|
@ -687,12 +680,12 @@ void SV_Physics_Toss (edict_t *ent)
|
||||||
if (ent->velocity[2] > 0)
|
if (ent->velocity[2] > 0)
|
||||||
ent->groundentity = NULL;
|
ent->groundentity = NULL;
|
||||||
|
|
||||||
// check for the groundentity going away
|
// check for the groundentity going away
|
||||||
if (ent->groundentity)
|
if (ent->groundentity)
|
||||||
if (!ent->groundentity->inuse)
|
if (!ent->groundentity->inuse)
|
||||||
ent->groundentity = NULL;
|
ent->groundentity = NULL;
|
||||||
|
|
||||||
// if onground, return without moving
|
// if onground, return without moving
|
||||||
if ( ent->groundentity )
|
if ( ent->groundentity )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -700,15 +693,15 @@ void SV_Physics_Toss (edict_t *ent)
|
||||||
|
|
||||||
SV_CheckVelocity (ent);
|
SV_CheckVelocity (ent);
|
||||||
|
|
||||||
// add gravity
|
// add gravity
|
||||||
if (ent->movetype != MOVETYPE_FLY
|
if (ent->movetype != MOVETYPE_FLY
|
||||||
&& ent->movetype != MOVETYPE_FLYMISSILE)
|
&& ent->movetype != MOVETYPE_FLYMISSILE)
|
||||||
SV_AddGravity (ent);
|
SV_AddGravity (ent);
|
||||||
|
|
||||||
// move angles
|
// move angles
|
||||||
VectorMA (ent->s.angles, FRAMETIME, ent->avelocity, ent->s.angles);
|
VectorMA (ent->s.angles, FRAMETIME, ent->avelocity, ent->s.angles);
|
||||||
|
|
||||||
// move origin
|
// move origin
|
||||||
VectorScale (ent->velocity, FRAMETIME, move);
|
VectorScale (ent->velocity, FRAMETIME, move);
|
||||||
trace = SV_PushEntity (ent, move);
|
trace = SV_PushEntity (ent, move);
|
||||||
if (!ent->inuse)
|
if (!ent->inuse)
|
||||||
|
@ -723,7 +716,7 @@ void SV_Physics_Toss (edict_t *ent)
|
||||||
|
|
||||||
ClipVelocity (ent->velocity, trace.plane.normal, ent->velocity, backoff);
|
ClipVelocity (ent->velocity, trace.plane.normal, ent->velocity, backoff);
|
||||||
|
|
||||||
// stop if on ground
|
// stop if on ground
|
||||||
if (trace.plane.normal[2] > 0.7)
|
if (trace.plane.normal[2] > 0.7)
|
||||||
{
|
{
|
||||||
if (ent->velocity[2] < 60 || ent->movetype != MOVETYPE_BOUNCE )
|
if (ent->velocity[2] < 60 || ent->movetype != MOVETYPE_BOUNCE )
|
||||||
|
@ -734,12 +727,9 @@ void SV_Physics_Toss (edict_t *ent)
|
||||||
VectorCopy (vec3_origin, ent->avelocity);
|
VectorCopy (vec3_origin, ent->avelocity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (ent->touch)
|
|
||||||
// ent->touch (ent, trace.ent, &trace.plane, trace.surface);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for water transition
|
// check for water transition
|
||||||
wasinwater = (ent->watertype & MASK_WATER);
|
wasinwater = (ent->watertype & MASK_WATER);
|
||||||
ent->watertype = gi.pointcontents (ent->s.origin);
|
ent->watertype = gi.pointcontents (ent->s.origin);
|
||||||
isinwater = ent->watertype & MASK_WATER;
|
isinwater = ent->watertype & MASK_WATER;
|
||||||
|
@ -754,7 +744,7 @@ void SV_Physics_Toss (edict_t *ent)
|
||||||
else if (wasinwater && !isinwater)
|
else if (wasinwater && !isinwater)
|
||||||
gi.positioned_sound (ent->s.origin, g_edicts, CHAN_AUTO, gi.soundindex("misc/h2ohit1.wav"), 1, 1, 0);
|
gi.positioned_sound (ent->s.origin, g_edicts, CHAN_AUTO, gi.soundindex("misc/h2ohit1.wav"), 1, 1, 0);
|
||||||
|
|
||||||
// move teamslaves
|
// move teamslaves
|
||||||
for (slave = ent->teamchain; slave; slave = slave->teamchain)
|
for (slave = ent->teamchain; slave; slave = slave->teamchain)
|
||||||
{
|
{
|
||||||
VectorCopy (ent->s.origin, slave->s.origin);
|
VectorCopy (ent->s.origin, slave->s.origin);
|
||||||
|
@ -957,3 +947,4 @@ void G_RunEntity (edict_t *ent)
|
||||||
gi.error ("SV_Physics: bad movetype %i", (int)ent->movetype);
|
gi.error ("SV_Physics: bad movetype %i", (int)ent->movetype);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -172,8 +172,8 @@ void InitGame (void)
|
||||||
skill = gi.cvar ("skill", "1", CVAR_LATCH);
|
skill = gi.cvar ("skill", "1", CVAR_LATCH);
|
||||||
maxentities = gi.cvar ("maxentities", "1024", CVAR_LATCH);
|
maxentities = gi.cvar ("maxentities", "1024", CVAR_LATCH);
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
//This game.dll only supports deathmatch
|
//This game.dll only supports deathmatch
|
||||||
if (!deathmatch->value) {
|
if (!deathmatch->value) {
|
||||||
gi.dprintf("Forcing deathmatch.\n");
|
gi.dprintf("Forcing deathmatch.\n");
|
||||||
gi.cvar_set("deathmatch", "1");
|
gi.cvar_set("deathmatch", "1");
|
||||||
|
@ -181,17 +181,17 @@ void InitGame (void)
|
||||||
//force coop off
|
//force coop off
|
||||||
if (coop->value)
|
if (coop->value)
|
||||||
gi.cvar_set("coop", "0");
|
gi.cvar_set("coop", "0");
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
|
|
||||||
// change anytime vars
|
// change anytime vars
|
||||||
dmflags = gi.cvar ("dmflags", "0", CVAR_SERVERINFO);
|
dmflags = gi.cvar ("dmflags", "0", CVAR_SERVERINFO);
|
||||||
fraglimit = gi.cvar ("fraglimit", "0", CVAR_SERVERINFO);
|
fraglimit = gi.cvar ("fraglimit", "0", CVAR_SERVERINFO);
|
||||||
timelimit = gi.cvar ("timelimit", "0", CVAR_SERVERINFO);
|
timelimit = gi.cvar ("timelimit", "0", CVAR_SERVERINFO);
|
||||||
//ZOID
|
//ZOID
|
||||||
capturelimit = gi.cvar ("capturelimit", "0", CVAR_SERVERINFO);
|
capturelimit = gi.cvar ("capturelimit", "0", CVAR_SERVERINFO);
|
||||||
instantweap = gi.cvar ("instantweap", "0", CVAR_SERVERINFO);
|
instantweap = gi.cvar ("instantweap", "0", CVAR_SERVERINFO);
|
||||||
//ZOID
|
//ZOID
|
||||||
password = gi.cvar ("password", "", CVAR_USERINFO);
|
password = gi.cvar ("password", "", CVAR_USERINFO);
|
||||||
filterban = gi.cvar ("filterban", "1", 0);
|
filterban = gi.cvar ("filterban", "1", 0);
|
||||||
|
|
||||||
|
@ -229,9 +229,9 @@ void InitGame (void)
|
||||||
game.clients = gi.TagMalloc (game.maxclients * sizeof(game.clients[0]), TAG_GAME);
|
game.clients = gi.TagMalloc (game.maxclients * sizeof(game.clients[0]), TAG_GAME);
|
||||||
globals.num_edicts = game.maxclients+1;
|
globals.num_edicts = game.maxclients+1;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
CTFInit();
|
CTFInit();
|
||||||
//ZOID
|
//ZOID
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================
|
//=========================================================
|
||||||
|
|
|
@ -155,10 +155,10 @@ spawn_t spawns[] = {
|
||||||
{"info_player_deathmatch", SP_info_player_deathmatch},
|
{"info_player_deathmatch", SP_info_player_deathmatch},
|
||||||
{"info_player_coop", SP_info_player_coop},
|
{"info_player_coop", SP_info_player_coop},
|
||||||
{"info_player_intermission", SP_info_player_intermission},
|
{"info_player_intermission", SP_info_player_intermission},
|
||||||
//ZOID
|
//ZOID
|
||||||
{"info_player_team1", SP_info_player_team1},
|
{"info_player_team1", SP_info_player_team1},
|
||||||
{"info_player_team2", SP_info_player_team2},
|
{"info_player_team2", SP_info_player_team2},
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
{"func_plat", SP_func_plat},
|
{"func_plat", SP_func_plat},
|
||||||
{"func_button", SP_func_button},
|
{"func_button", SP_func_button},
|
||||||
|
@ -202,9 +202,6 @@ spawn_t spawns[] = {
|
||||||
{"target_crosslevel_target", SP_target_crosslevel_target},
|
{"target_crosslevel_target", SP_target_crosslevel_target},
|
||||||
{"target_laser", SP_target_laser},
|
{"target_laser", SP_target_laser},
|
||||||
{"target_help", SP_target_help},
|
{"target_help", SP_target_help},
|
||||||
#if 0 // remove monster code
|
|
||||||
{"target_actor", SP_target_actor},
|
|
||||||
#endif
|
|
||||||
{"target_lightramp", SP_target_lightramp},
|
{"target_lightramp", SP_target_lightramp},
|
||||||
{"target_earthquake", SP_target_earthquake},
|
{"target_earthquake", SP_target_earthquake},
|
||||||
{"target_character", SP_target_character},
|
{"target_character", SP_target_character},
|
||||||
|
@ -224,67 +221,29 @@ spawn_t spawns[] = {
|
||||||
|
|
||||||
{"misc_explobox", SP_misc_explobox},
|
{"misc_explobox", SP_misc_explobox},
|
||||||
{"misc_banner", SP_misc_banner},
|
{"misc_banner", SP_misc_banner},
|
||||||
//ZOID
|
//ZOID
|
||||||
{"misc_ctf_banner", SP_misc_ctf_banner},
|
{"misc_ctf_banner", SP_misc_ctf_banner},
|
||||||
{"misc_ctf_small_banner", SP_misc_ctf_small_banner},
|
{"misc_ctf_small_banner", SP_misc_ctf_small_banner},
|
||||||
//ZOID
|
//ZOID
|
||||||
{"misc_satellite_dish", SP_misc_satellite_dish},
|
{"misc_satellite_dish", SP_misc_satellite_dish},
|
||||||
#if 0 // remove monster code
|
|
||||||
{"misc_actor", SP_misc_actor},
|
|
||||||
#endif
|
|
||||||
{"misc_gib_arm", SP_misc_gib_arm},
|
{"misc_gib_arm", SP_misc_gib_arm},
|
||||||
{"misc_gib_leg", SP_misc_gib_leg},
|
{"misc_gib_leg", SP_misc_gib_leg},
|
||||||
{"misc_gib_head", SP_misc_gib_head},
|
{"misc_gib_head", SP_misc_gib_head},
|
||||||
#if 0 // remove monster code
|
|
||||||
{"misc_insane", SP_misc_insane},
|
|
||||||
#endif
|
|
||||||
{"misc_deadsoldier", SP_misc_deadsoldier},
|
|
||||||
{"misc_viper", SP_misc_viper},
|
{"misc_viper", SP_misc_viper},
|
||||||
{"misc_viper_bomb", SP_misc_viper_bomb},
|
{"misc_viper_bomb", SP_misc_viper_bomb},
|
||||||
{"misc_bigviper", SP_misc_bigviper},
|
{"misc_bigviper", SP_misc_bigviper},
|
||||||
{"misc_strogg_ship", SP_misc_strogg_ship},
|
{"misc_strogg_ship", SP_misc_strogg_ship},
|
||||||
{"misc_teleporter", SP_misc_teleporter},
|
{"misc_teleporter", SP_misc_teleporter},
|
||||||
{"misc_teleporter_dest", SP_misc_teleporter_dest},
|
{"misc_teleporter_dest", SP_misc_teleporter_dest},
|
||||||
//ZOID
|
//ZOID
|
||||||
{"trigger_teleport", SP_trigger_teleport},
|
{"trigger_teleport", SP_trigger_teleport},
|
||||||
{"info_teleport_destination", SP_info_teleport_destination},
|
{"info_teleport_destination", SP_info_teleport_destination},
|
||||||
//ZOID
|
//ZOID
|
||||||
{"misc_blackhole", SP_misc_blackhole},
|
{"misc_blackhole", SP_misc_blackhole},
|
||||||
{"misc_eastertank", SP_misc_eastertank},
|
{"misc_eastertank", SP_misc_eastertank},
|
||||||
{"misc_easterchick", SP_misc_easterchick},
|
{"misc_easterchick", SP_misc_easterchick},
|
||||||
{"misc_easterchick2", SP_misc_easterchick2},
|
{"misc_easterchick2", SP_misc_easterchick2},
|
||||||
|
|
||||||
#if 0 // remove monster code
|
|
||||||
{"monster_berserk", SP_monster_berserk},
|
|
||||||
{"monster_gladiator", SP_monster_gladiator},
|
|
||||||
{"monster_gunner", SP_monster_gunner},
|
|
||||||
{"monster_infantry", SP_monster_infantry},
|
|
||||||
{"monster_soldier_light", SP_monster_soldier_light},
|
|
||||||
{"monster_soldier", SP_monster_soldier},
|
|
||||||
{"monster_soldier_ss", SP_monster_soldier_ss},
|
|
||||||
{"monster_tank", SP_monster_tank},
|
|
||||||
{"monster_tank_commander", SP_monster_tank},
|
|
||||||
{"monster_medic", SP_monster_medic},
|
|
||||||
{"monster_flipper", SP_monster_flipper},
|
|
||||||
{"monster_chick", SP_monster_chick},
|
|
||||||
{"monster_parasite", SP_monster_parasite},
|
|
||||||
{"monster_flyer", SP_monster_flyer},
|
|
||||||
{"monster_brain", SP_monster_brain},
|
|
||||||
{"monster_floater", SP_monster_floater},
|
|
||||||
{"monster_hover", SP_monster_hover},
|
|
||||||
{"monster_mutant", SP_monster_mutant},
|
|
||||||
{"monster_supertank", SP_monster_supertank},
|
|
||||||
{"monster_boss2", SP_monster_boss2},
|
|
||||||
{"monster_boss3_stand", SP_monster_boss3_stand},
|
|
||||||
{"monster_jorg", SP_monster_jorg},
|
|
||||||
|
|
||||||
{"monster_commander_body", SP_monster_commander_body},
|
|
||||||
|
|
||||||
{"turret_breach", SP_turret_breach},
|
|
||||||
{"turret_base", SP_turret_base},
|
|
||||||
{"turret_driver", SP_turret_driver},
|
|
||||||
#endif
|
|
||||||
|
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -442,10 +401,10 @@ char *ED_ParseEdict (char *data, edict_t *ent)
|
||||||
init = false;
|
init = false;
|
||||||
memset (&st, 0, sizeof(st));
|
memset (&st, 0, sizeof(st));
|
||||||
|
|
||||||
// go through all the dictionary pairs
|
// go through all the dictionary pairs
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
// parse key
|
// parse key
|
||||||
com_token = COM_Parse (&data);
|
com_token = COM_Parse (&data);
|
||||||
if (com_token[0] == '}')
|
if (com_token[0] == '}')
|
||||||
break;
|
break;
|
||||||
|
@ -454,7 +413,7 @@ char *ED_ParseEdict (char *data, edict_t *ent)
|
||||||
|
|
||||||
strncpy (keyname, com_token, sizeof(keyname)-1);
|
strncpy (keyname, com_token, sizeof(keyname)-1);
|
||||||
|
|
||||||
// parse value
|
// parse value
|
||||||
com_token = COM_Parse (&data);
|
com_token = COM_Parse (&data);
|
||||||
if (!data)
|
if (!data)
|
||||||
gi.error ("ED_ParseEntity: EOF without closing brace");
|
gi.error ("ED_ParseEntity: EOF without closing brace");
|
||||||
|
@ -464,8 +423,8 @@ char *ED_ParseEdict (char *data, edict_t *ent)
|
||||||
|
|
||||||
init = true;
|
init = true;
|
||||||
|
|
||||||
// keynames with a leading underscore are used for utility comments,
|
// keynames with a leading underscore are used for utility comments,
|
||||||
// and are immediately discarded by quake
|
// and are immediately discarded by quake
|
||||||
if (keyname[0] == '_')
|
if (keyname[0] == '_')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -572,7 +531,7 @@ void SpawnEntities (char *mapname, char *entities, char *spawnpoint)
|
||||||
ent = NULL;
|
ent = NULL;
|
||||||
inhibit = 0;
|
inhibit = 0;
|
||||||
|
|
||||||
// parse ents
|
// parse ents
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
// parse the opening brace
|
// parse the opening brace
|
||||||
|
@ -630,37 +589,14 @@ void SpawnEntities (char *mapname, char *entities, char *spawnpoint)
|
||||||
|
|
||||||
PlayerTrail_Init ();
|
PlayerTrail_Init ();
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
CTFSpawn();
|
CTFSpawn();
|
||||||
//ZOID
|
//ZOID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//===================================================================
|
//===================================================================
|
||||||
|
|
||||||
#if 0
|
|
||||||
// cursor positioning
|
|
||||||
xl <value>
|
|
||||||
xr <value>
|
|
||||||
yb <value>
|
|
||||||
yt <value>
|
|
||||||
xv <value>
|
|
||||||
yv <value>
|
|
||||||
|
|
||||||
// drawing
|
|
||||||
statpic <name>
|
|
||||||
pic <stat>
|
|
||||||
num <fieldwidth> <stat>
|
|
||||||
string <stat>
|
|
||||||
|
|
||||||
// control
|
|
||||||
if <stat>
|
|
||||||
ifeq <stat> <value>
|
|
||||||
ifbit <stat> <value>
|
|
||||||
endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
char *single_statusbar =
|
char *single_statusbar =
|
||||||
"yb -24 "
|
"yb -24 "
|
||||||
|
|
||||||
|
@ -837,12 +773,12 @@ void SP_worldspawn (edict_t *ent)
|
||||||
|
|
||||||
// status bar program
|
// status bar program
|
||||||
if (deathmatch->value)
|
if (deathmatch->value)
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ctf->value) {
|
if (ctf->value) {
|
||||||
gi.configstring (CS_STATUSBAR, ctf_statusbar);
|
gi.configstring (CS_STATUSBAR, ctf_statusbar);
|
||||||
CTFPrecache();
|
CTFPrecache();
|
||||||
} else
|
} else
|
||||||
//ZOID
|
//ZOID
|
||||||
gi.configstring (CS_STATUSBAR, dm_statusbar);
|
gi.configstring (CS_STATUSBAR, dm_statusbar);
|
||||||
else
|
else
|
||||||
gi.configstring (CS_STATUSBAR, single_statusbar);
|
gi.configstring (CS_STATUSBAR, single_statusbar);
|
||||||
|
@ -943,9 +879,9 @@ void SP_worldspawn (edict_t *ent)
|
||||||
gi.modelindex ("models/objects/gibs/skull/tris.md2");
|
gi.modelindex ("models/objects/gibs/skull/tris.md2");
|
||||||
gi.modelindex ("models/objects/gibs/head2/tris.md2");
|
gi.modelindex ("models/objects/gibs/head2/tris.md2");
|
||||||
|
|
||||||
//
|
//
|
||||||
// Setup light animation tables. 'a' is total darkness, 'z' is doublebright.
|
// Setup light animation tables. 'a' is total darkness, 'z' is doublebright.
|
||||||
//
|
//
|
||||||
|
|
||||||
// 0 normal
|
// 0 normal
|
||||||
gi.configstring(CS_LIGHTS+0, "m");
|
gi.configstring(CS_LIGHTS+0, "m");
|
||||||
|
|
|
@ -807,3 +807,4 @@ void SP_target_earthquake (edict_t *self)
|
||||||
|
|
||||||
self->noise_index = gi.soundindex ("world/quake.wav");
|
self->noise_index = gi.soundindex ("world/quake.wav");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -572,7 +572,7 @@ void trigger_monsterjump_touch (edict_t *self, edict_t *other, cplane_t *plane,
|
||||||
if ( !(other->svflags & SVF_MONSTER))
|
if ( !(other->svflags & SVF_MONSTER))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// set XY even if not on ground, so the jump will clear lips
|
// set XY even if not on ground, so the jump will clear lips
|
||||||
other->velocity[0] = self->movedir[0] * self->speed;
|
other->velocity[0] = self->movedir[0] * self->speed;
|
||||||
other->velocity[1] = self->movedir[1] * self->speed;
|
other->velocity[1] = self->movedir[1] * self->speed;
|
||||||
|
|
||||||
|
|
|
@ -174,9 +174,9 @@ void G_UseTargets (edict_t *ent, edict_t *activator)
|
||||||
{
|
{
|
||||||
edict_t *t;
|
edict_t *t;
|
||||||
|
|
||||||
//
|
//
|
||||||
// check for a delay
|
// check for a delay
|
||||||
//
|
//
|
||||||
if (ent->delay)
|
if (ent->delay)
|
||||||
{
|
{
|
||||||
// create a temp object to fire at a later time
|
// create a temp object to fire at a later time
|
||||||
|
@ -194,9 +194,9 @@ void G_UseTargets (edict_t *ent, edict_t *activator)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// print the message
|
// print the message
|
||||||
//
|
//
|
||||||
if ((ent->message) && !(activator->svflags & SVF_MONSTER))
|
if ((ent->message) && !(activator->svflags & SVF_MONSTER))
|
||||||
{
|
{
|
||||||
gi.centerprintf (activator, "%s", ent->message);
|
gi.centerprintf (activator, "%s", ent->message);
|
||||||
|
@ -206,9 +206,9 @@ void G_UseTargets (edict_t *ent, edict_t *activator)
|
||||||
gi.sound (activator, CHAN_AUTO, gi.soundindex ("misc/talk1.wav"), 1, ATTN_NORM, 0);
|
gi.sound (activator, CHAN_AUTO, gi.soundindex ("misc/talk1.wav"), 1, ATTN_NORM, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// kill killtargets
|
// kill killtargets
|
||||||
//
|
//
|
||||||
if (ent->killtarget)
|
if (ent->killtarget)
|
||||||
{
|
{
|
||||||
t = NULL;
|
t = NULL;
|
||||||
|
@ -223,11 +223,9 @@ void G_UseTargets (edict_t *ent, edict_t *activator)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// gi.dprintf("TARGET: activating %s\n", ent->target);
|
//
|
||||||
|
// fire targets
|
||||||
//
|
//
|
||||||
// fire targets
|
|
||||||
//
|
|
||||||
if (ent->target)
|
if (ent->target)
|
||||||
{
|
{
|
||||||
t = NULL;
|
t = NULL;
|
||||||
|
@ -457,7 +455,6 @@ void G_FreeEdict (edict_t *ed)
|
||||||
|
|
||||||
if ((ed - g_edicts) <= (maxclients->value + BODY_QUEUE_SIZE))
|
if ((ed - g_edicts) <= (maxclients->value + BODY_QUEUE_SIZE))
|
||||||
{
|
{
|
||||||
// gi.dprintf("tried to free special edict\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -568,3 +565,4 @@ qboolean KillBox (edict_t *ent)
|
||||||
|
|
||||||
return true; // all clear
|
return true; // all clear
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -695,7 +695,6 @@ void fire_rail (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick
|
||||||
gi.WritePosition (start);
|
gi.WritePosition (start);
|
||||||
gi.WritePosition (tr.endpos);
|
gi.WritePosition (tr.endpos);
|
||||||
gi.multicast (self->s.origin, MULTICAST_PHS);
|
gi.multicast (self->s.origin, MULTICAST_PHS);
|
||||||
// gi.multicast (start, MULTICAST_PHS);
|
|
||||||
if (water)
|
if (water)
|
||||||
{
|
{
|
||||||
gi.WriteByte (svc_temp_entity);
|
gi.WriteByte (svc_temp_entity);
|
||||||
|
@ -829,13 +828,13 @@ void bfg_think (edict_t *self)
|
||||||
if (!(ent->svflags & SVF_MONSTER) && (!ent->client) && (strcmp(ent->classname, "misc_explobox") != 0))
|
if (!(ent->svflags & SVF_MONSTER) && (!ent->client) && (strcmp(ent->classname, "misc_explobox") != 0))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
//don't target players in CTF
|
//don't target players in CTF
|
||||||
if (ctf->value && ent->client &&
|
if (ctf->value && ent->client &&
|
||||||
self->owner->client &&
|
self->owner->client &&
|
||||||
ent->client->resp.ctf_team == self->owner->client->resp.ctf_team)
|
ent->client->resp.ctf_team == self->owner->client->resp.ctf_team)
|
||||||
continue;
|
continue;
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
VectorMA (ent->absmin, 0.5, ent->size, point);
|
VectorMA (ent->absmin, 0.5, ent->size, point);
|
||||||
|
|
||||||
|
@ -919,3 +918,4 @@ void fire_bfg (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, f
|
||||||
|
|
||||||
gi.linkentity (bfg);
|
gi.linkentity (bfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -240,3 +240,4 @@ typedef struct
|
||||||
} game_export_t;
|
} game_export_t;
|
||||||
|
|
||||||
game_export_t *GetGameApi (game_import_t *import);
|
game_export_t *GetGameApi (game_import_t *import);
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,9 @@ qboolean M_CheckBottom (edict_t *ent)
|
||||||
VectorAdd (ent->s.origin, ent->mins, mins);
|
VectorAdd (ent->s.origin, ent->mins, mins);
|
||||||
VectorAdd (ent->s.origin, ent->maxs, maxs);
|
VectorAdd (ent->s.origin, ent->maxs, maxs);
|
||||||
|
|
||||||
// if all of the points under the corners are solid world, don't bother
|
// if all of the points under the corners are solid world, don't bother
|
||||||
// with the tougher checks
|
// with the tougher checks
|
||||||
// the corners must be within 16 of the midpoint
|
// the corners must be within 16 of the midpoint
|
||||||
start[2] = mins[2] - 1;
|
start[2] = mins[2] - 1;
|
||||||
for (x=0 ; x<=1 ; x++)
|
for (x=0 ; x<=1 ; x++)
|
||||||
for (y=0 ; y<=1 ; y++)
|
for (y=0 ; y<=1 ; y++)
|
||||||
|
@ -62,12 +62,12 @@ qboolean M_CheckBottom (edict_t *ent)
|
||||||
|
|
||||||
realcheck:
|
realcheck:
|
||||||
c_no++;
|
c_no++;
|
||||||
//
|
//
|
||||||
// check it for real...
|
// check it for real...
|
||||||
//
|
//
|
||||||
start[2] = mins[2];
|
start[2] = mins[2];
|
||||||
|
|
||||||
// the midpoint must be within 16 of the bottom
|
// the midpoint must be within 16 of the bottom
|
||||||
start[0] = stop[0] = (mins[0] + maxs[0])*0.5;
|
start[0] = stop[0] = (mins[0] + maxs[0])*0.5;
|
||||||
start[1] = stop[1] = (mins[1] + maxs[1])*0.5;
|
start[1] = stop[1] = (mins[1] + maxs[1])*0.5;
|
||||||
stop[2] = start[2] - 2*STEPSIZE;
|
stop[2] = start[2] - 2*STEPSIZE;
|
||||||
|
@ -76,8 +76,8 @@ realcheck:
|
||||||
if (trace.fraction == 1.0)
|
if (trace.fraction == 1.0)
|
||||||
return false;
|
return false;
|
||||||
mid = bottom = trace.endpos[2];
|
mid = bottom = trace.endpos[2];
|
||||||
|
|
||||||
// the corners must be within 16 of the midpoint
|
// the corners must be within 16 of the midpoint
|
||||||
for (x=0 ; x<=1 ; x++)
|
for (x=0 ; x<=1 ; x++)
|
||||||
for (y=0 ; y<=1 ; y++)
|
for (y=0 ; y<=1 ; y++)
|
||||||
{
|
{
|
||||||
|
@ -119,11 +119,11 @@ qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
|
||||||
vec3_t test;
|
vec3_t test;
|
||||||
int contents;
|
int contents;
|
||||||
|
|
||||||
// try the move
|
// try the move
|
||||||
VectorCopy (ent->s.origin, oldorg);
|
VectorCopy (ent->s.origin, oldorg);
|
||||||
VectorAdd (ent->s.origin, move, neworg);
|
VectorAdd (ent->s.origin, move, neworg);
|
||||||
|
|
||||||
// flying monsters don't step up
|
// flying monsters don't step up
|
||||||
if ( ent->flags & (FL_SWIM | FL_FLY) )
|
if ( ent->flags & (FL_SWIM | FL_FLY) )
|
||||||
{
|
{
|
||||||
// try one move with vertical motion, then one without
|
// try one move with vertical motion, then one without
|
||||||
|
@ -203,7 +203,7 @@ qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// push down from a step height above the wished position
|
// push down from a step height above the wished position
|
||||||
if (!(ent->monsterinfo.aiflags & AI_NOSTEP))
|
if (!(ent->monsterinfo.aiflags & AI_NOSTEP))
|
||||||
stepsize = STEPSIZE;
|
stepsize = STEPSIZE;
|
||||||
else
|
else
|
||||||
|
@ -257,7 +257,7 @@ qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
|
||||||
return false; // walked off an edge
|
return false; // walked off an edge
|
||||||
}
|
}
|
||||||
|
|
||||||
// check point traces down for dangling corners
|
// check point traces down for dangling corners
|
||||||
VectorCopy (trace.endpos, ent->s.origin);
|
VectorCopy (trace.endpos, ent->s.origin);
|
||||||
|
|
||||||
if (!M_CheckBottom (ent))
|
if (!M_CheckBottom (ent))
|
||||||
|
@ -283,7 +283,7 @@ qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
|
||||||
ent->groundentity = trace.ent;
|
ent->groundentity = trace.ent;
|
||||||
ent->groundentity_linkcount = trace.ent->linkcount;
|
ent->groundentity_linkcount = trace.ent->linkcount;
|
||||||
|
|
||||||
// the move is ok
|
// the move is ok
|
||||||
if (relink)
|
if (relink)
|
||||||
{
|
{
|
||||||
gi.linkentity (ent);
|
gi.linkentity (ent);
|
||||||
|
@ -428,7 +428,7 @@ void SV_NewChaseDir (edict_t *actor, edict_t *enemy, float dist)
|
||||||
else
|
else
|
||||||
d[2]= DI_NODIR;
|
d[2]= DI_NODIR;
|
||||||
|
|
||||||
// try direct route
|
// try direct route
|
||||||
if (d[1] != DI_NODIR && d[2] != DI_NODIR)
|
if (d[1] != DI_NODIR && d[2] != DI_NODIR)
|
||||||
{
|
{
|
||||||
if (d[1] == 0)
|
if (d[1] == 0)
|
||||||
|
@ -440,7 +440,7 @@ void SV_NewChaseDir (edict_t *actor, edict_t *enemy, float dist)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// try other directions
|
// try other directions
|
||||||
if ( ((rand()&3) & 1) || abs(deltay)>abs(deltax))
|
if ( ((rand()&3) & 1) || abs(deltay)>abs(deltax))
|
||||||
{
|
{
|
||||||
tdir=d[1];
|
tdir=d[1];
|
||||||
|
@ -456,7 +456,7 @@ void SV_NewChaseDir (edict_t *actor, edict_t *enemy, float dist)
|
||||||
&& SV_StepDirection(actor, d[2], dist))
|
&& SV_StepDirection(actor, d[2], dist))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* there is no direct path to the player, so pick another direction */
|
/* there is no direct path to the player, so pick another direction */
|
||||||
|
|
||||||
if (olddir!=DI_NODIR && SV_StepDirection(actor, olddir, dist))
|
if (olddir!=DI_NODIR && SV_StepDirection(actor, olddir, dist))
|
||||||
return;
|
return;
|
||||||
|
@ -479,8 +479,8 @@ void SV_NewChaseDir (edict_t *actor, edict_t *enemy, float dist)
|
||||||
|
|
||||||
actor->ideal_yaw = olddir; // can't move
|
actor->ideal_yaw = olddir; // can't move
|
||||||
|
|
||||||
// if a bridge was pulled out from underneath a monster, it may not have
|
// if a bridge was pulled out from underneath a monster, it may not have
|
||||||
// a valid standing position at all
|
// a valid standing position at all
|
||||||
|
|
||||||
if (!M_CheckBottom (actor))
|
if (!M_CheckBottom (actor))
|
||||||
SV_FixCheckBottom (actor);
|
SV_FixCheckBottom (actor);
|
||||||
|
@ -521,11 +521,11 @@ void M_MoveToGoal (edict_t *ent, float dist)
|
||||||
if (!ent->groundentity && !(ent->flags & (FL_FLY|FL_SWIM)))
|
if (!ent->groundentity && !(ent->flags & (FL_FLY|FL_SWIM)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// if the next step hits the enemy, return immediately
|
// if the next step hits the enemy, return immediately
|
||||||
if (ent->enemy && SV_CloseEnough (ent, ent->enemy, dist) )
|
if (ent->enemy && SV_CloseEnough (ent, ent->enemy, dist) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// bump around...
|
// bump around...
|
||||||
if ( (rand()&3)==1 || !SV_StepDirection (ent, ent->ideal_yaw, dist))
|
if ( (rand()&3)==1 || !SV_StepDirection (ent, ent->ideal_yaw, dist))
|
||||||
{
|
{
|
||||||
if (ent->inuse)
|
if (ent->inuse)
|
||||||
|
@ -554,3 +554,4 @@ qboolean M_walkmove (edict_t *ent, float yaw, float dist)
|
||||||
|
|
||||||
return SV_movestep(ent, move, true);
|
return SV_movestep(ent, move, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,6 @@ static void SP_FixCoopSpots (edict_t *self)
|
||||||
{
|
{
|
||||||
if ((!self->targetname) || Q_stricmp(self->targetname, spot->targetname) != 0)
|
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;
|
self->targetname = spot->targetname;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -364,12 +363,12 @@ void ClientObituary (edict_t *self, edict_t *inflictor, edict_t *attacker)
|
||||||
message = "tried to invade";
|
message = "tried to invade";
|
||||||
message2 = "'s personal space";
|
message2 = "'s personal space";
|
||||||
break;
|
break;
|
||||||
//ZOID
|
//ZOID
|
||||||
case MOD_GRAPPLE:
|
case MOD_GRAPPLE:
|
||||||
message = "was caught by";
|
message = "was caught by";
|
||||||
message2 = "'s grapple";
|
message2 = "'s grapple";
|
||||||
break;
|
break;
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
}
|
}
|
||||||
if (message)
|
if (message)
|
||||||
|
@ -494,9 +493,9 @@ void player_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damag
|
||||||
self->movetype = MOVETYPE_TOSS;
|
self->movetype = MOVETYPE_TOSS;
|
||||||
|
|
||||||
self->s.modelindex2 = 0; // remove linked weapon model
|
self->s.modelindex2 = 0; // remove linked weapon model
|
||||||
//ZOID
|
//ZOID
|
||||||
self->s.modelindex3 = 0; // remove linked ctf flag
|
self->s.modelindex3 = 0; // remove linked ctf flag
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
self->s.angles[0] = 0;
|
self->s.angles[0] = 0;
|
||||||
self->s.angles[2] = 0;
|
self->s.angles[2] = 0;
|
||||||
|
@ -506,7 +505,6 @@ void player_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damag
|
||||||
|
|
||||||
self->maxs[2] = -8;
|
self->maxs[2] = -8;
|
||||||
|
|
||||||
// self->solid = SOLID_NOT;
|
|
||||||
self->svflags |= SVF_DEADMONSTER;
|
self->svflags |= SVF_DEADMONSTER;
|
||||||
|
|
||||||
if (!self->deadflag)
|
if (!self->deadflag)
|
||||||
|
@ -515,7 +513,7 @@ void player_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damag
|
||||||
LookAtKiller (self, inflictor, attacker);
|
LookAtKiller (self, inflictor, attacker);
|
||||||
self->client->ps.pmove.pm_type = PM_DEAD;
|
self->client->ps.pmove.pm_type = PM_DEAD;
|
||||||
ClientObituary (self, inflictor, attacker);
|
ClientObituary (self, inflictor, attacker);
|
||||||
//ZOID
|
//ZOID
|
||||||
// if at start and same team, clear
|
// if at start and same team, clear
|
||||||
if (ctf->value && meansOfDeath == MOD_TELEFRAG &&
|
if (ctf->value && meansOfDeath == MOD_TELEFRAG &&
|
||||||
self->client->resp.ctf_state < 2 &&
|
self->client->resp.ctf_state < 2 &&
|
||||||
|
@ -525,13 +523,13 @@ void player_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damag
|
||||||
}
|
}
|
||||||
|
|
||||||
CTFFragBonuses(self, inflictor, attacker);
|
CTFFragBonuses(self, inflictor, attacker);
|
||||||
//ZOID
|
//ZOID
|
||||||
TossClientWeapon (self);
|
TossClientWeapon (self);
|
||||||
//ZOID
|
//ZOID
|
||||||
CTFPlayerResetGrapple(self);
|
CTFPlayerResetGrapple(self);
|
||||||
CTFDeadDropFlag(self);
|
CTFDeadDropFlag(self);
|
||||||
CTFDeadDropTech(self);
|
CTFDeadDropTech(self);
|
||||||
//ZOID
|
//ZOID
|
||||||
if (deathmatch->value && !self->client->showscores)
|
if (deathmatch->value && !self->client->showscores)
|
||||||
Cmd_Help_f (self); // show scores
|
Cmd_Help_f (self); // show scores
|
||||||
}
|
}
|
||||||
|
@ -552,10 +550,10 @@ void player_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damag
|
||||||
for (n= 0; n < 4; n++)
|
for (n= 0; n < 4; n++)
|
||||||
ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
|
ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
|
||||||
ThrowClientHead (self, damage);
|
ThrowClientHead (self, damage);
|
||||||
//ZOID
|
//ZOID
|
||||||
self->client->anim_priority = ANIM_DEATH;
|
self->client->anim_priority = ANIM_DEATH;
|
||||||
self->client->anim_end = 0;
|
self->client->anim_end = 0;
|
||||||
//ZOID
|
//ZOID
|
||||||
self->takedamage = DAMAGE_NO;
|
self->takedamage = DAMAGE_NO;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -617,14 +615,14 @@ void InitClientPersistant (gclient_t *client)
|
||||||
client->pers.inventory[client->pers.selected_item] = 1;
|
client->pers.inventory[client->pers.selected_item] = 1;
|
||||||
|
|
||||||
client->pers.weapon = item;
|
client->pers.weapon = item;
|
||||||
//ZOID
|
//ZOID
|
||||||
client->pers.lastweapon = item;
|
client->pers.lastweapon = item;
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
item = FindItem("Grapple");
|
item = FindItem("Grapple");
|
||||||
client->pers.inventory[ITEM_INDEX(item)] = 1;
|
client->pers.inventory[ITEM_INDEX(item)] = 1;
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
client->pers.health = 100;
|
client->pers.health = 100;
|
||||||
client->pers.max_health = 100;
|
client->pers.max_health = 100;
|
||||||
|
@ -642,25 +640,25 @@ void InitClientPersistant (gclient_t *client)
|
||||||
|
|
||||||
void InitClientResp (gclient_t *client)
|
void InitClientResp (gclient_t *client)
|
||||||
{
|
{
|
||||||
//ZOID
|
//ZOID
|
||||||
int ctf_team = client->resp.ctf_team;
|
int ctf_team = client->resp.ctf_team;
|
||||||
qboolean id_state = client->resp.id_state;
|
qboolean id_state = client->resp.id_state;
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
memset (&client->resp, 0, sizeof(client->resp));
|
memset (&client->resp, 0, sizeof(client->resp));
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
client->resp.ctf_team = ctf_team;
|
client->resp.ctf_team = ctf_team;
|
||||||
client->resp.id_state = id_state;
|
client->resp.id_state = id_state;
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
client->resp.enterframe = level.framenum;
|
client->resp.enterframe = level.framenum;
|
||||||
client->resp.coop_respawn = client->pers;
|
client->resp.coop_respawn = client->pers;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ctf->value && client->resp.ctf_team < CTF_TEAM1)
|
if (ctf->value && client->resp.ctf_team < CTF_TEAM1)
|
||||||
CTFAssignTeam(client);
|
CTFAssignTeam(client);
|
||||||
//ZOID
|
//ZOID
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -903,11 +901,11 @@ void SelectSpawnPoint (edict_t *ent, vec3_t origin, vec3_t angles)
|
||||||
edict_t *spot = NULL;
|
edict_t *spot = NULL;
|
||||||
|
|
||||||
if (deathmatch->value)
|
if (deathmatch->value)
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ctf->value)
|
if (ctf->value)
|
||||||
spot = SelectCTFSpawnPoint(ent);
|
spot = SelectCTFSpawnPoint(ent);
|
||||||
else
|
else
|
||||||
//ZOID
|
//ZOID
|
||||||
spot = SelectDeathmatchSpawnPoint ();
|
spot = SelectDeathmatchSpawnPoint ();
|
||||||
else if (coop->value)
|
else if (coop->value)
|
||||||
spot = SelectCoopSpawnPoint (ent);
|
spot = SelectCoopSpawnPoint (ent);
|
||||||
|
@ -1139,9 +1137,9 @@ void PutClientInServer (edict_t *ent)
|
||||||
client->ps.pmove.origin[0] = spawn_origin[0]*8;
|
client->ps.pmove.origin[0] = spawn_origin[0]*8;
|
||||||
client->ps.pmove.origin[1] = spawn_origin[1]*8;
|
client->ps.pmove.origin[1] = spawn_origin[1]*8;
|
||||||
client->ps.pmove.origin[2] = spawn_origin[2]*8;
|
client->ps.pmove.origin[2] = spawn_origin[2]*8;
|
||||||
//ZOID
|
//ZOID
|
||||||
client->ps.pmove.pm_flags &= ~PMF_NO_PREDICTION;
|
client->ps.pmove.pm_flags &= ~PMF_NO_PREDICTION;
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
if (deathmatch->value && ((int)dmflags->value & DF_FIXED_FOV))
|
if (deathmatch->value && ((int)dmflags->value & DF_FIXED_FOV))
|
||||||
{
|
{
|
||||||
|
@ -1182,10 +1180,10 @@ void PutClientInServer (edict_t *ent)
|
||||||
VectorCopy (ent->s.angles, client->ps.viewangles);
|
VectorCopy (ent->s.angles, client->ps.viewangles);
|
||||||
VectorCopy (ent->s.angles, client->v_angle);
|
VectorCopy (ent->s.angles, client->v_angle);
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (CTFStartClient(ent))
|
if (CTFStartClient(ent))
|
||||||
return;
|
return;
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
if (!KillBox (ent))
|
if (!KillBox (ent))
|
||||||
{ // could't spawn in?
|
{ // could't spawn in?
|
||||||
|
@ -1330,17 +1328,17 @@ void ClientUserinfoChanged (edict_t *ent, char *userinfo)
|
||||||
playernum = ent-g_edicts-1;
|
playernum = ent-g_edicts-1;
|
||||||
|
|
||||||
// combine name and skin into a configstring
|
// combine name and skin into a configstring
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ctf->value)
|
if (ctf->value)
|
||||||
CTFAssignSkin(ent, s);
|
CTFAssignSkin(ent, s);
|
||||||
else
|
else
|
||||||
//ZOID
|
//ZOID
|
||||||
gi.configstring (CS_PLAYERSKINS+playernum, va("%s\\%s", ent->client->pers.netname, s) );
|
gi.configstring (CS_PLAYERSKINS+playernum, va("%s\\%s", ent->client->pers.netname, s) );
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
// set player name field (used in id_state view)
|
// set player name field (used in id_state view)
|
||||||
gi.configstring (CS_GENERAL+playernum, ent->client->pers.netname);
|
gi.configstring (CS_GENERAL+playernum, ent->client->pers.netname);
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
// fov
|
// fov
|
||||||
if (deathmatch->value && ((int)dmflags->value & DF_FIXED_FOV))
|
if (deathmatch->value && ((int)dmflags->value & DF_FIXED_FOV))
|
||||||
|
@ -1408,10 +1406,10 @@ qboolean ClientConnect (edict_t *ent, char *userinfo)
|
||||||
if (ent->inuse == false)
|
if (ent->inuse == false)
|
||||||
{
|
{
|
||||||
// clear the respawning variables
|
// clear the respawning variables
|
||||||
//ZOID -- force team join
|
//ZOID -- force team join
|
||||||
ent->client->resp.ctf_team = -1;
|
ent->client->resp.ctf_team = -1;
|
||||||
ent->client->resp.id_state = true;
|
ent->client->resp.id_state = true;
|
||||||
//ZOID
|
//ZOID
|
||||||
InitClientResp (ent->client);
|
InitClientResp (ent->client);
|
||||||
if (!game.autosaved || !ent->client->pers.weapon)
|
if (!game.autosaved || !ent->client->pers.weapon)
|
||||||
InitClientPersistant (ent->client);
|
InitClientPersistant (ent->client);
|
||||||
|
@ -1443,10 +1441,10 @@ void ClientDisconnect (edict_t *ent)
|
||||||
|
|
||||||
gi.bprintf (PRINT_HIGH, "%s disconnected\n", ent->client->pers.netname);
|
gi.bprintf (PRINT_HIGH, "%s disconnected\n", ent->client->pers.netname);
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
CTFDeadDropFlag(ent);
|
CTFDeadDropFlag(ent);
|
||||||
CTFDeadDropTech(ent);
|
CTFDeadDropTech(ent);
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
// send effect
|
// send effect
|
||||||
gi.WriteByte (svc_muzzleflash);
|
gi.WriteByte (svc_muzzleflash);
|
||||||
|
@ -1527,14 +1525,14 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
|
||||||
|
|
||||||
pm_passent = ent;
|
pm_passent = ent;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ent->client->chase_target) {
|
if (ent->client->chase_target) {
|
||||||
client->resp.cmd_angles[0] = SHORT2ANGLE(ucmd->angles[0]);
|
client->resp.cmd_angles[0] = SHORT2ANGLE(ucmd->angles[0]);
|
||||||
client->resp.cmd_angles[1] = SHORT2ANGLE(ucmd->angles[1]);
|
client->resp.cmd_angles[1] = SHORT2ANGLE(ucmd->angles[1]);
|
||||||
client->resp.cmd_angles[2] = SHORT2ANGLE(ucmd->angles[2]);
|
client->resp.cmd_angles[2] = SHORT2ANGLE(ucmd->angles[2]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
// set up for pmove
|
// set up for pmove
|
||||||
memset (&pm, 0, sizeof(pm));
|
memset (&pm, 0, sizeof(pm));
|
||||||
|
@ -1560,7 +1558,6 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
|
||||||
if (memcmp(&client->old_pmove, &pm.s, sizeof(pm.s)))
|
if (memcmp(&client->old_pmove, &pm.s, sizeof(pm.s)))
|
||||||
{
|
{
|
||||||
pm.snapinitial = true;
|
pm.snapinitial = true;
|
||||||
// gi.dprintf ("pmove changed!\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pm.cmd = *ucmd;
|
pm.cmd = *ucmd;
|
||||||
|
@ -1613,10 +1610,10 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
|
||||||
VectorCopy (pm.viewangles, client->ps.viewangles);
|
VectorCopy (pm.viewangles, client->ps.viewangles);
|
||||||
}
|
}
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (client->ctf_grapple)
|
if (client->ctf_grapple)
|
||||||
CTFGrapplePull(client->ctf_grapple);
|
CTFGrapplePull(client->ctf_grapple);
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
gi.linkentity (ent);
|
gi.linkentity (ent);
|
||||||
|
|
||||||
|
@ -1648,9 +1645,9 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
|
||||||
|
|
||||||
// fire weapon from final position if needed
|
// fire weapon from final position if needed
|
||||||
if (client->latched_buttons & BUTTON_ATTACK
|
if (client->latched_buttons & BUTTON_ATTACK
|
||||||
//ZOID
|
//ZOID
|
||||||
&& ent->movetype != MOVETYPE_NOCLIP
|
&& ent->movetype != MOVETYPE_NOCLIP
|
||||||
//ZOID
|
//ZOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (!client->weapon_thunk)
|
if (!client->weapon_thunk)
|
||||||
|
@ -1660,12 +1657,12 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
//regen tech
|
//regen tech
|
||||||
CTFApplyRegeneration(ent);
|
CTFApplyRegeneration(ent);
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
for (i = 1; i <= maxclients->value; i++) {
|
for (i = 1; i <= maxclients->value; i++) {
|
||||||
other = g_edicts + i;
|
other = g_edicts + i;
|
||||||
if (other->inuse && other->client->chase_target == ent)
|
if (other->inuse && other->client->chase_target == ent)
|
||||||
|
@ -1678,7 +1675,7 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
|
||||||
client->menutime = level.time;
|
client->menutime = level.time;
|
||||||
client->menudirty = false;
|
client->menudirty = false;
|
||||||
}
|
}
|
||||||
//ZOID
|
//ZOID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1702,9 +1699,9 @@ void ClientBeginServerFrame (edict_t *ent)
|
||||||
|
|
||||||
// run weapon animations if it hasn't been done by a ucmd_t
|
// run weapon animations if it hasn't been done by a ucmd_t
|
||||||
if (!client->weapon_thunk
|
if (!client->weapon_thunk
|
||||||
//ZOID
|
//ZOID
|
||||||
&& ent->movetype != MOVETYPE_NOCLIP
|
&& ent->movetype != MOVETYPE_NOCLIP
|
||||||
//ZOID
|
//ZOID
|
||||||
)
|
)
|
||||||
Think_Weapon (ent);
|
Think_Weapon (ent);
|
||||||
else
|
else
|
||||||
|
@ -1739,3 +1736,4 @@ void ClientBeginServerFrame (edict_t *ent)
|
||||||
|
|
||||||
client->latched_buttons = 0;
|
client->latched_buttons = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,10 +78,10 @@ void BeginIntermission (edict_t *targ)
|
||||||
if (level.intermissiontime)
|
if (level.intermissiontime)
|
||||||
return; // allready activated
|
return; // allready activated
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (deathmatch->value && ctf->value)
|
if (deathmatch->value && ctf->value)
|
||||||
CTFCalcScores();
|
CTFCalcScores();
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
game.autosaved = false;
|
game.autosaved = false;
|
||||||
|
|
||||||
|
@ -181,12 +181,12 @@ void DeathmatchScoreboardMessage (edict_t *ent, edict_t *killer)
|
||||||
edict_t *cl_ent;
|
edict_t *cl_ent;
|
||||||
char *tag;
|
char *tag;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ctf->value) {
|
if (ctf->value) {
|
||||||
CTFScoreboardMessage (ent, killer);
|
CTFScoreboardMessage (ent, killer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
// sort the clients by score
|
// sort the clients by score
|
||||||
total = 0;
|
total = 0;
|
||||||
|
@ -289,10 +289,10 @@ void Cmd_Score_f (edict_t *ent)
|
||||||
{
|
{
|
||||||
ent->client->showinventory = false;
|
ent->client->showinventory = false;
|
||||||
ent->client->showhelp = false;
|
ent->client->showhelp = false;
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ent->client->menu)
|
if (ent->client->menu)
|
||||||
PMenu_Close(ent);
|
PMenu_Close(ent);
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
if (!deathmatch->value && !coop->value)
|
if (!deathmatch->value && !coop->value)
|
||||||
return;
|
return;
|
||||||
|
@ -539,8 +539,8 @@ void G_SetStats (edict_t *ent)
|
||||||
else
|
else
|
||||||
ent->client->ps.stats[STAT_HELPICON] = 0;
|
ent->client->ps.stats[STAT_HELPICON] = 0;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
SetCTFStats(ent);
|
SetCTFStats(ent);
|
||||||
//ZOID
|
//ZOID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -254,3 +254,4 @@ void PMenu_Select(edict_t *ent)
|
||||||
if (p->SelectFunc)
|
if (p->SelectFunc)
|
||||||
p->SelectFunc(ent, hnd);
|
p->SelectFunc(ent, hnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,3 +47,4 @@ void PMenu_Update(edict_t *ent);
|
||||||
void PMenu_Next(edict_t *ent);
|
void PMenu_Next(edict_t *ent);
|
||||||
void PMenu_Prev(edict_t *ent);
|
void PMenu_Prev(edict_t *ent);
|
||||||
void PMenu_Select(edict_t *ent);
|
void PMenu_Select(edict_t *ent);
|
||||||
|
|
||||||
|
|
|
@ -144,3 +144,4 @@ edict_t *PlayerTrail_LastSpot (void)
|
||||||
{
|
{
|
||||||
return trail[PREV(trail_head)];
|
return trail[PREV(trail_head)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -311,7 +311,6 @@ void SV_CalcViewOffset (edict_t *ent)
|
||||||
bob = bobfracsin * xyspeed * bob_up->value;
|
bob = bobfracsin * xyspeed * bob_up->value;
|
||||||
if (bob > 6)
|
if (bob > 6)
|
||||||
bob = 6;
|
bob = 6;
|
||||||
//gi.DebugGraph (bob *2, 255);
|
|
||||||
v[2] += bob;
|
v[2] += bob;
|
||||||
|
|
||||||
// add kick offset
|
// add kick offset
|
||||||
|
@ -377,7 +376,6 @@ void SV_CalcGunOffset (edict_t *ent)
|
||||||
|
|
||||||
// gun height
|
// gun height
|
||||||
VectorClear (ent->client->ps.gunoffset);
|
VectorClear (ent->client->ps.gunoffset);
|
||||||
// ent->ps->gunorigin[2] += bob;
|
|
||||||
|
|
||||||
// gun_x / gun_y / gun_z are development tools
|
// gun_x / gun_y / gun_z are development tools
|
||||||
for (i=0 ; i<3 ; i++)
|
for (i=0 ; i<3 ; i++)
|
||||||
|
@ -522,13 +520,13 @@ void P_FallingDamage (edict_t *ent)
|
||||||
}
|
}
|
||||||
delta = delta*delta * 0.0001;
|
delta = delta*delta * 0.0001;
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
// never take damage if just release grapple or on grapple
|
// never take damage if just release grapple or on grapple
|
||||||
if (level.time - ent->client->ctf_grapplereleasetime <= FRAMETIME * 2 ||
|
if (level.time - ent->client->ctf_grapplereleasetime <= FRAMETIME * 2 ||
|
||||||
(ent->client->ctf_grapple &&
|
(ent->client->ctf_grapple &&
|
||||||
ent->client->ctf_grapplestate > CTF_GRAPPLE_STATE_FLY))
|
ent->client->ctf_grapplestate > CTF_GRAPPLE_STATE_FLY))
|
||||||
return;
|
return;
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
// never take falling damage if completely underwater
|
// never take falling damage if completely underwater
|
||||||
if (ent->waterlevel == 3)
|
if (ent->waterlevel == 3)
|
||||||
|
@ -775,15 +773,14 @@ void G_SetClientEffects (edict_t *ent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
CTFEffects(ent);
|
CTFEffects(ent);
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
if (ent->client->quad_framenum > level.framenum)
|
if (ent->client->quad_framenum > level.framenum)
|
||||||
{
|
{
|
||||||
remaining = ent->client->quad_framenum - level.framenum;
|
remaining = ent->client->quad_framenum - level.framenum;
|
||||||
if (remaining > 30 || (remaining & 4) )
|
if (remaining > 30 || (remaining & 4) )
|
||||||
// ent->s.effects |= EF_QUAD;
|
|
||||||
CTFSetPowerUpEffect(ent, EF_QUAD);
|
CTFSetPowerUpEffect(ent, EF_QUAD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -791,7 +788,6 @@ void G_SetClientEffects (edict_t *ent)
|
||||||
{
|
{
|
||||||
remaining = ent->client->invincible_framenum - level.framenum;
|
remaining = ent->client->invincible_framenum - level.framenum;
|
||||||
if (remaining > 30 || (remaining & 4) )
|
if (remaining > 30 || (remaining & 4) )
|
||||||
// ent->s.effects |= EF_PENT;
|
|
||||||
CTFSetPowerUpEffect(ent, EF_PENT);
|
CTFSetPowerUpEffect(ent, EF_PENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -927,13 +923,13 @@ newanim:
|
||||||
|
|
||||||
if (!ent->groundentity)
|
if (!ent->groundentity)
|
||||||
{
|
{
|
||||||
//ZOID: if on grapple, don't go into jump frame, go into standing
|
//ZOID: if on grapple, don't go into jump frame, go into standing
|
||||||
//frame
|
//frame
|
||||||
if (client->ctf_grapple) {
|
if (client->ctf_grapple) {
|
||||||
ent->s.frame = FRAME_stand01;
|
ent->s.frame = FRAME_stand01;
|
||||||
client->anim_end = FRAME_stand40;
|
client->anim_end = FRAME_stand40;
|
||||||
} else {
|
} else {
|
||||||
//ZOID
|
//ZOID
|
||||||
client->anim_priority = ANIM_JUMP;
|
client->anim_priority = ANIM_JUMP;
|
||||||
if (ent->s.frame != FRAME_jump2)
|
if (ent->s.frame != FRAME_jump2)
|
||||||
ent->s.frame = FRAME_jump1;
|
ent->s.frame = FRAME_jump1;
|
||||||
|
@ -1077,24 +1073,24 @@ void ClientEndServerFrame (edict_t *ent)
|
||||||
// should be determined by the client
|
// should be determined by the client
|
||||||
SV_CalcBlend (ent);
|
SV_CalcBlend (ent);
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
if (!ent->client->chase_target)
|
if (!ent->client->chase_target)
|
||||||
//ZOID
|
//ZOID
|
||||||
G_SetStats (ent);
|
G_SetStats (ent);
|
||||||
|
|
||||||
//ZOID
|
//ZOID
|
||||||
//update chasecam follower stats
|
//update chasecam follower stats
|
||||||
for (i = 1; i <= maxclients->value; i++) {
|
for (i = 1; i <= maxclients->value; i++) {
|
||||||
edict_t *e = g_edicts + i;
|
edict_t *e = g_edicts + i;
|
||||||
if (!e->inuse || e->client->chase_target != ent)
|
if (!e->inuse || e->client->chase_target != ent)
|
||||||
continue;
|
continue;
|
||||||
memcpy(e->client->ps.stats,
|
memcpy(e->client->ps.stats,
|
||||||
ent->client->ps.stats,
|
ent->client->ps.stats,
|
||||||
sizeof(ent->client->ps.stats));
|
sizeof(ent->client->ps.stats));
|
||||||
e->client->ps.stats[STAT_LAYOUTS] = 1;
|
e->client->ps.stats[STAT_LAYOUTS] = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
|
|
||||||
G_SetClientEvent (ent);
|
G_SetClientEvent (ent);
|
||||||
|
@ -1115,13 +1111,13 @@ void ClientEndServerFrame (edict_t *ent)
|
||||||
// if the scoreboard is up, update it
|
// if the scoreboard is up, update it
|
||||||
if (ent->client->showscores && !(level.framenum & 31) )
|
if (ent->client->showscores && !(level.framenum & 31) )
|
||||||
{
|
{
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ent->client->menu) {
|
if (ent->client->menu) {
|
||||||
PMenu_Do_Update(ent);
|
PMenu_Do_Update(ent);
|
||||||
ent->client->menudirty = false;
|
ent->client->menudirty = false;
|
||||||
ent->client->menutime = level.time;
|
ent->client->menutime = level.time;
|
||||||
} else
|
} else
|
||||||
//ZOID
|
//ZOID
|
||||||
DeathmatchScoreboardMessage (ent, ent->enemy);
|
DeathmatchScoreboardMessage (ent, ent->enemy);
|
||||||
gi.unicast (ent, false);
|
gi.unicast (ent, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -518,14 +518,14 @@ static void Weapon_Generic2 (edict_t *ent, int FRAME_ACTIVATE_LAST, int FRAME_FI
|
||||||
{
|
{
|
||||||
if (ent->client->ps.gunframe == fire_frames[n])
|
if (ent->client->ps.gunframe == fire_frames[n])
|
||||||
{
|
{
|
||||||
//ZOID
|
//ZOID
|
||||||
if (!CTFApplyStrengthSound(ent))
|
if (!CTFApplyStrengthSound(ent))
|
||||||
//ZOID
|
//ZOID
|
||||||
if (ent->client->quad_framenum > level.framenum)
|
if (ent->client->quad_framenum > level.framenum)
|
||||||
gi.sound(ent, CHAN_ITEM, gi.soundindex("items/damage3.wav"), 1, ATTN_NORM, 0);
|
gi.sound(ent, CHAN_ITEM, gi.soundindex("items/damage3.wav"), 1, ATTN_NORM, 0);
|
||||||
//ZOID
|
//ZOID
|
||||||
CTFApplyHasteSound(ent);
|
CTFApplyHasteSound(ent);
|
||||||
//ZOID
|
//ZOID
|
||||||
|
|
||||||
fire (ent);
|
fire (ent);
|
||||||
break;
|
break;
|
||||||
|
@ -1463,3 +1463,4 @@ void Weapon_BFG (edict_t *ent)
|
||||||
|
|
||||||
|
|
||||||
//======================================================================
|
//======================================================================
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue