Mal angefangen aufzuräumen

This commit is contained in:
Yamagi Burmeister 2009-03-30 12:59:22 +00:00
parent 00467e1c25
commit b6f3898533
2 changed files with 2 additions and 42 deletions

View file

@ -52,7 +52,6 @@ int DBall_CheckDMRules (void)
return 0;
}
//==================
//==================
void DBall_ClientBegin (edict_t *ent)
{
@ -108,7 +107,6 @@ void DBall_ClientBegin (edict_t *ent)
gi.dprintf("%d unassigned players present!\n", unassigned);
}
//==================
//==================
void DBall_SelectSpawnPoint (edict_t *ent, vec3_t origin, vec3_t angles)
{
@ -153,7 +151,6 @@ void DBall_SelectSpawnPoint (edict_t *ent, vec3_t origin, vec3_t angles)
SelectSpawnPoint(ent, origin, angles);
}
//==================
//==================
void DBall_GameInit (void)
{
@ -171,7 +168,6 @@ void DBall_GameInit (void)
goallimit = gi.cvar ("goallimit", "0", 0);
}
//==================
//==================
void DBall_PostInitSetup (void)
{
@ -179,7 +175,7 @@ void DBall_PostInitSetup (void)
e=NULL;
// turn teleporter destinations nonsolid.
while(e = G_Find (e, FOFS(classname), "misc_teleporter_dest"))
while(e = G_Find(e, FOFS(classname), "misc_teleporter_dest"))
{
e->solid = SOLID_NOT;
gi.linkentity (e);
@ -214,7 +210,6 @@ int DBall_ChangeDamage (edict_t *targ, edict_t *attacker, int damage, int mod)
return damage;
}
//==================
//==================
int DBall_ChangeKnockback (edict_t *targ, edict_t *attacker, int knockback, int mod)
{
@ -271,7 +266,6 @@ int DBall_ChangeKnockback (edict_t *targ, edict_t *attacker, int knockback, int
}
}
// gi.dprintf("mod: %d knockback: %d\n", mod, knockback);
return knockback;
}
@ -355,7 +349,6 @@ void DBall_GoalTouch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t
// **************************
// Ball
// **************************
edict_t *PickBallStart (edict_t *ent)
{
int which, current;
@ -416,8 +409,6 @@ void DBall_BallPain (edict_t *self, edict_t *other, float kick, int damage)
{
self->enemy = other;
self->health = self->max_health;
// if(other->classname)
// gi.dprintf("hurt by %s -- %d\n", other->classname, self->health);
}
void DBall_BallDie (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
@ -434,7 +425,6 @@ void DBall_BallDie (edict_t *self, edict_t *inflictor, edict_t *attacker, int da
// make it invisible and desolid until respawn time
self->solid = SOLID_NOT;
// self->s.modelindex = 0;
self->think = DBall_BallRespawn;
self->nextthink = level.time + 2;
gi.linkentity(self);
@ -529,7 +519,6 @@ void SP_dm_dball_ball (edict_t *self)
}
dball_ball_entity = self;
// VectorCopy (self->s.origin, dball_ball_startpt);
self->s.modelindex = gi.modelindex ("models/objects/dball/tris.md2");
VectorSet (self->mins, -32, -32, -32);
@ -676,3 +665,4 @@ void SP_dm_dball_goal (edict_t *self)
gi.linkentity (self);
}

View file

@ -17,22 +17,15 @@ edict_t *tag_token;
edict_t *tag_owner;
int tag_count;
//=================
//=================
void Tag_PlayerDeath(edict_t *targ, edict_t *inflictor, edict_t *attacker)
{
// gi.dprintf("%s killed %s\n", attacker->classname, targ->classname);
// gi.dprintf("%x killed %x\n", attacker, targ);
if(tag_token && targ && (targ == tag_owner))
{
// gi.dprintf("owner died/suicided. dropping\n");
Tag_DropToken(targ, FindItem( "Tag Token" ));
tag_owner = NULL;
tag_count = 0;
}
// else
// gi.dprintf("unrelated slaying\n");
}
//=================
@ -64,7 +57,6 @@ void Tag_PlayerDisconnect (edict_t *self)
{
if(tag_token && self && (self == tag_owner))
{
// gi.dprintf("owner died/suicided. dropping\n");
Tag_DropToken(self, FindItem( "Tag Token" ));
tag_owner = NULL;
tag_count = 0;
@ -80,8 +72,6 @@ void Tag_Score (edict_t *attacker, edict_t *victim, int scoreChange)
mod = meansOfDeath & ~MOD_FRIENDLY_FIRE;
// gi.dprintf("%s killed %s\n", attacker->classname, victim->classname);
// gi.dprintf("%x killed %x\n", attacker, victim);
if(tag_token && tag_owner)
{
// owner killed somone else
@ -89,10 +79,8 @@ void Tag_Score (edict_t *attacker, edict_t *victim, int scoreChange)
{
scoreChange = 3;
tag_count++;
// gi.dprintf("tag total: %d\n", tag_count);
if(tag_count == 5)
{
// gi.dprintf("going to quad\n");
quad = FindItem ("Quad Damage");
attacker->client->pers.inventory[ITEM_INDEX(quad)]++;
quad->use (attacker, quad);
@ -102,7 +90,6 @@ void Tag_Score (edict_t *attacker, edict_t *victim, int scoreChange)
// owner got killed. 5 points and switch owners
else if(tag_owner == victim && tag_owner != attacker)
{
// gi.dprintf("owner killed by another player.\n");
scoreChange = 5;
if ((mod == MOD_HUNTER_SPHERE) || (mod == MOD_DOPPLE_EXPLODE) ||
(mod == MOD_DOPPLE_VENGEANCE) || (mod == MOD_DOPPLE_HUNTER) ||
@ -119,12 +106,7 @@ void Tag_Score (edict_t *attacker, edict_t *victim, int scoreChange)
tag_count = 0;
}
}
// else
// gi.dprintf("unaffected slaying\n");
}
// else
// gi.dprintf("no tag token?\n");
attacker->client->resp.score += scoreChange;
}
@ -137,7 +119,6 @@ qboolean Tag_PickupToken (edict_t *ent, edict_t *other)
return false;
}
// gi.dprintf("tag token picked up by %x\n", other);
// sanity checking is good.
if(tag_token != ent)
tag_token = ent;
@ -161,13 +142,10 @@ void Tag_Respawn (edict_t *ent)
spot = SelectFarthestDeathmatchSpawnPoint();
if(spot == NULL)
{
// gi.dprintf("No open spawn point, waiting...\n");
ent->nextthink = level.time + 1;
return;
}
// gi.dprintf("Relocating\n");
VectorCopy(spot->s.origin, ent->s.origin);
gi.linkentity(ent);
}
@ -183,12 +161,10 @@ void Tag_MakeTouchable (edict_t *ent)
// check here to see if it's in lava or slime. if so, do a respawn sooner
if(gi.pointcontents(ent->s.origin) & (CONTENTS_LAVA|CONTENTS_SLIME))
{
// gi.dprintf("spawned in slime or lava. quick relocate\n");
tag_token->nextthink = level.time + 3;
}
else
{
// gi.dprintf("spawned in the clear. regular relocate\n");
tag_token->nextthink = level.time + 30;
}
}
@ -201,11 +177,6 @@ void Tag_DropToken (edict_t *ent, gitem_t *item)
vec3_t forward, right;
vec3_t offset;
// if(ent->client)
// gi.dprintf("%s dropped the tag token\n", ent->client->pers.netname);
// else
// gi.dprintf("non-client dropped the tag token (%s)\n", ent->classname);
// reset the score count for next player
tag_count = 0;
tag_owner = NULL;
@ -240,7 +211,6 @@ void Tag_DropToken (edict_t *ent, gitem_t *item)
gi.linkentity (tag_token);
// tag_token = Drop_Item (ent, item);
ent->client->pers.inventory[ITEM_INDEX(item)]--;
ValidateSelectedItem (ent);
}