mirror of
https://github.com/yquake2/rogue.git
synced 2025-02-16 17:11:02 +00:00
Remove dead code
This commit is contained in:
parent
40c1b71def
commit
ec3ceb2696
15 changed files with 8 additions and 107 deletions
|
@ -168,8 +168,6 @@ SpawnDamage
|
|||
*/
|
||||
void SpawnDamage (int type, vec3_t origin, vec3_t normal, int damage)
|
||||
{
|
||||
if (damage > 255)
|
||||
damage = 255;
|
||||
gi.WriteByte (svc_temp_entity);
|
||||
gi.WriteByte (type);
|
||||
gi.WritePosition (origin);
|
||||
|
@ -680,7 +678,6 @@ void T_Damage (edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir,
|
|||
{
|
||||
if(client && client->owned_sphere)
|
||||
{
|
||||
sphere_notified = true;
|
||||
if(client->owned_sphere->pain)
|
||||
client->owned_sphere->pain (client->owned_sphere, attacker, 0, 0);
|
||||
}
|
||||
|
|
|
@ -1586,6 +1586,12 @@ void door_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
edict_t *ent;
|
||||
vec3_t center; //PGM
|
||||
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
if (!self->flags)
|
||||
return;
|
||||
|
||||
if (self->flags & FL_TEAMSLAVE)
|
||||
return;
|
||||
|
||||
|
|
15
src/g_misc.c
15
src/g_misc.c
|
@ -864,21 +864,6 @@ void func_explosive_use(edict_t *self, edict_t *other, edict_t *activator)
|
|||
//PGM
|
||||
void func_explosive_activate(edict_t *self, edict_t *other, edict_t *activator)
|
||||
{
|
||||
int approved;
|
||||
|
||||
approved = 0;
|
||||
// PMM - looked like target and targetname were flipped here
|
||||
if (other != NULL && other->target)
|
||||
{
|
||||
if(!strcmp(other->target, self->targetname))
|
||||
approved = 1;
|
||||
}
|
||||
if (!approved && activator!=NULL && activator->target)
|
||||
{
|
||||
if(!strcmp(activator->target, self->targetname))
|
||||
approved = 1;
|
||||
}
|
||||
|
||||
self->use = func_explosive_use;
|
||||
if (!self->health)
|
||||
self->health = 100;
|
||||
|
|
|
@ -426,8 +426,7 @@ qboolean monsterlost_checkhint (edict_t *self)
|
|||
edict_t *closest;
|
||||
float closest_range = 1000000;
|
||||
edict_t *start, *destination;
|
||||
int field;
|
||||
int count1=0, count2=0, count3=0, count4=0, count5=0;
|
||||
int count1=0, count2=0, count4=0, count5=0;
|
||||
float r;
|
||||
int i;
|
||||
qboolean hint_path_represented[MAX_HINT_CHAINS];
|
||||
|
@ -447,8 +446,6 @@ qboolean monsterlost_checkhint (edict_t *self)
|
|||
|
||||
monster_pathchain = NULL;
|
||||
|
||||
field = FOFS(classname);
|
||||
|
||||
// find all the hint_paths.
|
||||
// FIXME - can we not do this every time?
|
||||
for (i=0; i < num_hint_paths; i++)
|
||||
|
@ -562,9 +559,7 @@ qboolean monsterlost_checkhint (edict_t *self)
|
|||
e = e->monster_hint_chain;
|
||||
}
|
||||
|
||||
count1 = 0;
|
||||
count2 = 0;
|
||||
count3 = 0;
|
||||
count4 = 0;
|
||||
count5 = 0;
|
||||
|
||||
|
@ -854,7 +849,6 @@ void InitHintPaths (void)
|
|||
{
|
||||
edict_t *e, *current;
|
||||
int field, i, count2;
|
||||
qboolean errors = false;
|
||||
|
||||
hint_paths_present = 0;
|
||||
|
||||
|
@ -882,7 +876,6 @@ void InitHintPaths (void)
|
|||
{
|
||||
gi.dprintf ("Hint path at %s marked as endpoint with both target (%s) and targetname (%s)\n",
|
||||
vtos (e->s.origin), e->target, e->targetname);
|
||||
errors = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -909,8 +902,6 @@ void InitHintPaths (void)
|
|||
gi.dprintf ("\nForked hint path at %s detected for chain %d, target %s\n",
|
||||
vtos (current->s.origin), num_hint_paths, current->target);
|
||||
hint_path_start[i]->hint_chain = NULL;
|
||||
count2 = 0;
|
||||
errors = true;
|
||||
continue;
|
||||
}
|
||||
while (e)
|
||||
|
@ -920,8 +911,6 @@ void InitHintPaths (void)
|
|||
gi.dprintf ("\nCircular hint path at %s detected for chain %d, targetname %s\n",
|
||||
vtos (e->s.origin), num_hint_paths, e->targetname);
|
||||
hint_path_start[i]->hint_chain = NULL;
|
||||
count2 = 0;
|
||||
errors = true;
|
||||
break;
|
||||
}
|
||||
count2++;
|
||||
|
@ -936,7 +925,6 @@ void InitHintPaths (void)
|
|||
gi.dprintf ("\nForked hint path at %s detected for chain %d, target %s\n",
|
||||
vtos (current->s.origin), num_hint_paths, current->target);
|
||||
hint_path_start[i]->hint_chain = NULL;
|
||||
count2 = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1117,7 +1117,6 @@ void SV_Physics_NewToss (edict_t *ent)
|
|||
edict_t *slave;
|
||||
qboolean wasinwater;
|
||||
qboolean isinwater;
|
||||
qboolean wasonground;
|
||||
float speed, newspeed;
|
||||
vec3_t old_origin;
|
||||
|
||||
|
@ -1128,13 +1127,6 @@ void SV_Physics_NewToss (edict_t *ent)
|
|||
if ( ent->flags & FL_TEAMSLAVE)
|
||||
return;
|
||||
|
||||
if (ent->groundentity)
|
||||
wasonground = true;
|
||||
else
|
||||
wasonground = false;
|
||||
|
||||
wasinwater = ent->waterlevel;
|
||||
|
||||
// find out what we're sitting on.
|
||||
VectorCopy (ent->s.origin, move);
|
||||
move[2] -= 0.25;
|
||||
|
|
|
@ -1250,11 +1250,8 @@ edict_t *CreateGroundMonster (vec3_t origin, vec3_t angles, vec3_t entMins, vec3
|
|||
qboolean FindSpawnPoint (vec3_t startpoint, vec3_t mins, vec3_t maxs, vec3_t spawnpoint, float maxMoveUp)
|
||||
{
|
||||
trace_t tr;
|
||||
float height;
|
||||
vec3_t top;
|
||||
|
||||
height = maxs[2] - mins[2];
|
||||
|
||||
tr = gi.trace (startpoint, mins, maxs, startpoint, NULL, MASK_MONSTERSOLID|CONTENTS_PLAYERCLIP);
|
||||
if((tr.startsolid || tr.allsolid) || (tr.ent != world))
|
||||
{
|
||||
|
@ -1386,7 +1383,6 @@ realcheck:
|
|||
|
||||
if (tr.fraction == 1.0)
|
||||
return false;
|
||||
mid = bottom = tr.endpos[2];
|
||||
|
||||
if(gravity < 0)
|
||||
{
|
||||
|
|
|
@ -123,7 +123,6 @@ void sphere_chase (edict_t *self, int stupidChase)
|
|||
else if (VectorCompare (self->monsterinfo.saved_goal, vec3_origin))
|
||||
{
|
||||
VectorSubtract(self->enemy->s.origin, self->s.origin, dir);
|
||||
dist = VectorNormalize(dir);
|
||||
vectoangles2(dir, self->s.angles);
|
||||
|
||||
// if lurking, hunter sphere uses lurking sound
|
||||
|
@ -153,7 +152,6 @@ void sphere_chase (edict_t *self, int stupidChase)
|
|||
else
|
||||
{
|
||||
VectorSubtract(self->enemy->s.origin, self->s.origin, dir);
|
||||
dist = VectorNormalize(dir);
|
||||
vectoangles2(dir, self->s.angles);
|
||||
|
||||
// if not moving, hunter sphere uses lurk sound
|
||||
|
|
|
@ -398,15 +398,6 @@ speed default is 1000
|
|||
|
||||
void use_target_blaster (edict_t *self, edict_t *other, edict_t *activator)
|
||||
{
|
||||
int effect;
|
||||
|
||||
if (self->spawnflags & 2)
|
||||
effect = 0;
|
||||
else if (self->spawnflags & 1)
|
||||
effect = EF_HYPERBLASTER;
|
||||
else
|
||||
effect = EF_BLASTER;
|
||||
|
||||
fire_blaster (self, self->s.origin, self->movedir, self->dmg, self->speed, EF_BLASTER, MOD_TARGET_BLASTER);
|
||||
gi.sound (self, CHAN_VOICE, self->noise_index, 1, ATTN_NORM, 0);
|
||||
}
|
||||
|
|
|
@ -479,7 +479,6 @@ qboolean Boss2_CheckAttack (edict_t *self)
|
|||
vec3_t temp;
|
||||
float chance;
|
||||
trace_t tr;
|
||||
qboolean enemy_infront;
|
||||
int enemy_range;
|
||||
float enemy_yaw;
|
||||
|
||||
|
@ -498,7 +497,6 @@ qboolean Boss2_CheckAttack (edict_t *self)
|
|||
return false;
|
||||
}
|
||||
|
||||
enemy_infront = infront(self, self->enemy);
|
||||
enemy_range = range(self, self->enemy);
|
||||
VectorSubtract (self->enemy->s.origin, self->s.origin, temp);
|
||||
enemy_yaw = vectoyaw(temp);
|
||||
|
|
|
@ -512,10 +512,8 @@ void jorg_firebullet (edict_t *self)
|
|||
void jorg_attack(edict_t *self)
|
||||
{
|
||||
vec3_t vec;
|
||||
float range;
|
||||
|
||||
VectorSubtract (self->enemy->s.origin, self->s.origin, vec);
|
||||
range = VectorLength (vec);
|
||||
|
||||
if (random() <= 0.75)
|
||||
{
|
||||
|
@ -551,7 +549,6 @@ qboolean Jorg_CheckAttack (edict_t *self)
|
|||
vec3_t temp;
|
||||
float chance;
|
||||
trace_t tr;
|
||||
qboolean enemy_infront;
|
||||
int enemy_range;
|
||||
float enemy_yaw;
|
||||
|
||||
|
@ -570,7 +567,6 @@ qboolean Jorg_CheckAttack (edict_t *self)
|
|||
return false;
|
||||
}
|
||||
|
||||
enemy_infront = infront(self, self->enemy);
|
||||
enemy_range = range(self, self->enemy);
|
||||
VectorSubtract (self->enemy->s.origin, self->s.origin, temp);
|
||||
enemy_yaw = vectoyaw(temp);
|
||||
|
|
|
@ -589,14 +589,11 @@ void makron_sight(edict_t *self, edict_t *other)
|
|||
void makron_attack(edict_t *self)
|
||||
{
|
||||
vec3_t vec;
|
||||
float range;
|
||||
float r;
|
||||
|
||||
r = random();
|
||||
|
||||
VectorSubtract (self->enemy->s.origin, self->s.origin, vec);
|
||||
range = VectorLength (vec);
|
||||
|
||||
|
||||
if (r <= 0.3)
|
||||
self->monsterinfo.currentmove = &makron_move_attack3;
|
||||
|
@ -697,7 +694,6 @@ qboolean Makron_CheckAttack (edict_t *self)
|
|||
vec3_t temp;
|
||||
float chance;
|
||||
trace_t tr;
|
||||
qboolean enemy_infront;
|
||||
int enemy_range;
|
||||
float enemy_yaw;
|
||||
|
||||
|
@ -716,7 +712,6 @@ qboolean Makron_CheckAttack (edict_t *self)
|
|||
return false;
|
||||
}
|
||||
|
||||
enemy_infront = infront(self, self->enemy);
|
||||
enemy_range = range(self, self->enemy);
|
||||
VectorSubtract (self->enemy->s.origin, self->s.origin, temp);
|
||||
enemy_yaw = vectoyaw(temp);
|
||||
|
|
|
@ -338,13 +338,9 @@ void TurretFire (edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
chance = random();
|
||||
|
||||
// rockets fire less often than the others do.
|
||||
if (self->spawnflags & SPAWN_ROCKET)
|
||||
{
|
||||
chance = chance * 3;
|
||||
|
||||
rocketSpeed = 550;
|
||||
if (skill->value == 2)
|
||||
{
|
||||
|
@ -363,12 +359,8 @@ void TurretFire (edict_t *self)
|
|||
rocketSpeed = 800;
|
||||
else
|
||||
rocketSpeed = 1000;
|
||||
chance = chance * 2;
|
||||
}
|
||||
|
||||
// up the fire chance 20% per skill level.
|
||||
chance = chance - (0.2 * skill->value);
|
||||
|
||||
if(/*chance < 0.5 && */visible(self, self->enemy))
|
||||
{
|
||||
VectorCopy(self->s.origin, start);
|
||||
|
@ -420,7 +412,7 @@ void TurretFireBlind (edict_t *self)
|
|||
{
|
||||
vec3_t forward;
|
||||
vec3_t start, end, dir;
|
||||
float dist, chance;
|
||||
float chance;
|
||||
int rocketSpeed = 0;
|
||||
|
||||
TurretAim(self);
|
||||
|
@ -459,8 +451,6 @@ void TurretFireBlind (edict_t *self)
|
|||
end[2] += self->enemy->mins[2] - 10;
|
||||
|
||||
VectorSubtract(end, start, dir);
|
||||
dist = VectorLength(dir);
|
||||
|
||||
VectorNormalize(dir);
|
||||
|
||||
if(self->spawnflags & SPAWN_BLASTER)
|
||||
|
|
|
@ -297,23 +297,6 @@ void WidowSpawn (edict_t *self)
|
|||
|
||||
ent->monsterinfo.aiflags |= AI_SPAWNED_WIDOW|AI_DO_NOT_COUNT|AI_IGNORE_SHOTS;
|
||||
|
||||
if (!(coop && coop->value))
|
||||
{
|
||||
designated_enemy = self->enemy;
|
||||
}
|
||||
else
|
||||
{
|
||||
designated_enemy = PickCoopTarget(ent);
|
||||
if (designated_enemy)
|
||||
{
|
||||
// try to avoid using my enemy
|
||||
if (designated_enemy == self->enemy)
|
||||
{
|
||||
designated_enemy = PickCoopTarget(ent);
|
||||
designated_enemy = self->enemy;
|
||||
}
|
||||
}
|
||||
}
|
||||
designated_enemy = self->enemy;
|
||||
|
||||
if ((designated_enemy->inuse) && (designated_enemy->health > 0))
|
||||
|
@ -1156,7 +1139,6 @@ qboolean Widow_CheckAttack (edict_t *self)
|
|||
vec3_t temp;
|
||||
float chance = 0;
|
||||
trace_t tr;
|
||||
qboolean enemy_infront;
|
||||
int enemy_range;
|
||||
float enemy_yaw;
|
||||
float real_enemy_range;
|
||||
|
@ -1221,8 +1203,6 @@ qboolean Widow_CheckAttack (edict_t *self)
|
|||
}
|
||||
}
|
||||
|
||||
enemy_infront = infront(self, self->enemy);
|
||||
|
||||
enemy_range = range(self, self->enemy);
|
||||
VectorSubtract (self->enemy->s.origin, self->s.origin, temp);
|
||||
enemy_yaw = vectoyaw2(temp);
|
||||
|
@ -1302,10 +1282,6 @@ qboolean widow_blocked (edict_t *self, float dist)
|
|||
|
||||
void WidowCalcSlots (edict_t *self)
|
||||
{
|
||||
int old_slots;
|
||||
|
||||
old_slots = self->monsterinfo.monster_slots;
|
||||
|
||||
switch ((int)skill->value)
|
||||
{
|
||||
case 0:
|
||||
|
|
|
@ -475,7 +475,6 @@ void Widow2Tongue (edict_t *self)
|
|||
void Widow2TonguePull (edict_t *self)
|
||||
{
|
||||
vec3_t vec;
|
||||
float len;
|
||||
vec3_t f, r, u;
|
||||
vec3_t start, end;
|
||||
|
||||
|
@ -501,7 +500,6 @@ void Widow2TonguePull (edict_t *self)
|
|||
}
|
||||
|
||||
VectorSubtract (self->s.origin, self->enemy->s.origin, vec);
|
||||
len = VectorLength (vec);
|
||||
if (self->enemy->client)
|
||||
{
|
||||
VectorNormalize (vec);
|
||||
|
@ -950,7 +948,6 @@ qboolean Widow2_CheckAttack (edict_t *self)
|
|||
vec3_t temp;
|
||||
float chance = 0;
|
||||
trace_t tr;
|
||||
qboolean enemy_infront;
|
||||
int enemy_range;
|
||||
float enemy_yaw;
|
||||
float real_enemy_range;
|
||||
|
@ -994,8 +991,6 @@ qboolean Widow2_CheckAttack (edict_t *self)
|
|||
}
|
||||
}
|
||||
|
||||
enemy_infront = infront(self, self->enemy);
|
||||
|
||||
enemy_range = range(self, self->enemy);
|
||||
VectorSubtract (self->enemy->s.origin, self->s.origin, temp);
|
||||
enemy_yaw = vectoyaw2(temp);
|
||||
|
|
|
@ -156,7 +156,6 @@ void DeathmatchScoreboardMessage (edict_t *ent, edict_t *killer)
|
|||
int sorted[MAX_CLIENTS];
|
||||
int sortedscores[MAX_CLIENTS];
|
||||
int score, total;
|
||||
int picnum;
|
||||
int x, y;
|
||||
gclient_t *cl;
|
||||
edict_t *cl_ent;
|
||||
|
@ -199,7 +198,6 @@ void DeathmatchScoreboardMessage (edict_t *ent, edict_t *killer)
|
|||
cl = &game.clients[sorted[i]];
|
||||
cl_ent = g_edicts + 1 + sorted[i];
|
||||
|
||||
picnum = gi.imageindex ("i_fixme");
|
||||
x = (i>=6) ? 160 : 0;
|
||||
y = 32 + 32 * (i%6);
|
||||
|
||||
|
|
Loading…
Reference in a new issue