Beispiel #1
0
void
BecomeExplosion1 (edict_t * self)
{
  //flags are important
  if (ctf->value)
    {
      if (strcmp (self->classname, "item_flag_team1") == 0)
	{
	  CTFResetFlag (TEAM1);	// this will free self!
	  gi.bprintf (PRINT_HIGH, "The %s flag has returned!\n",
		      CTFTeamName (TEAM1));
	  return;
	}
      if (strcmp (self->classname, "item_flag_team2") == 0)
	{
	  CTFResetFlag (TEAM2);	// this will free self!
	  gi.bprintf (PRINT_HIGH, "The %s flag has returned!\n",
		      CTFTeamName (TEAM1));
	  return;
	}
    }
  gi.WriteByte (svc_temp_entity);
  gi.WriteByte (TE_EXPLOSION1);
  gi.WritePosition (self->s.origin);
  gi.multicast (self->s.origin, MULTICAST_PVS);

  G_FreeEdict (self);
}
Beispiel #2
0
void
BecomeExplosion1(edict_t *self)
{
	/* flags are important */
	if (strcmp(self->classname, "item_flag_team1") == 0)
	{
		CTFResetFlag(CTF_TEAM1); /* this will free self! */
		gi.bprintf(PRINT_HIGH, "The %s flag has returned!\n",
				CTFTeamName(CTF_TEAM1));
		return;
	}

	if (strcmp(self->classname, "item_flag_team2") == 0)
	{
		CTFResetFlag(CTF_TEAM2); /* this will free self! */
		gi.bprintf(PRINT_HIGH, "The %s flag has returned!\n",
				CTFTeamName(CTF_TEAM1));
		return;
	}

	/* techs are important too */
	if (self->item && (self->item->flags & IT_TECH))
	{
		CTFRespawnTech(self); /* this frees self! */
		return;
	}

	gi.WriteByte(svc_temp_entity);
	gi.WriteByte(TE_EXPLOSION1);
	gi.WritePosition(self->s.origin);
	gi.multicast(self->s.origin, MULTICAST_PVS);

	G_FreeEdict(self);
}
Beispiel #3
0
void BecomeExplosion1 (edict_t *self)
{
//ZOID
	//flags are important
	if (strcmp(self->classname, "item_flag_team1") == 0) {
		CTFResetFlag(CTF_TEAM1); // this will free self!
		bprintf2(PRINT_HIGH, "The %s flag has returned!\n",
			CTFTeamName(CTF_TEAM1));
		return;
	}
	if (strcmp(self->classname, "item_flag_team2") == 0) {
		CTFResetFlag(CTF_TEAM2); // this will free self!
		bprintf2(PRINT_HIGH, "The %s flag has returned!\n",
			CTFTeamName(CTF_TEAM1));
		return;
	}
	// techs are important too
	if (self->item && (self->item->flags & IT_TECH)) {
		CTFRespawnTech(self); // this frees self!
		return;
	}
//ZOID

	if (Q_stricmp(self->classname, "rocket_turret") == 0
		|| Q_stricmp(self->classname, "laser_turret") == 0)
		numturrets--;

	gi.WriteByte (svc_temp_entity);
	gi.WriteByte (TE_EXPLOSION1);
	gi.WritePosition (self->s.origin);
	gi.multicast (self->s.origin, MULTICAST_PVS);

// FWP fix for weapon killer bug - respawn weapon after showing cute explosion

        if (self->item && (self->item->flags & (IT_WEAPON | IT_POWERUP | IT_AMMO | IT_ARMOR))) {
	   if (self->spawnorigin) {
	      DoRespawn(self); // this frees self!
             return;
	   }
	}

	G_FreeEdict (self);

}