void ClientObituary (edict_t *self, edict_t *inflictor, edict_t *attacker) { int mod; char *message; char *message2; qboolean ff; if (coop->value && attacker->client) meansOfDeath |= MOD_FRIENDLY_FIRE; if (deathmatch->value || coop->value) { ff = meansOfDeath & MOD_FRIENDLY_FIRE; mod = meansOfDeath & ~MOD_FRIENDLY_FIRE; message = NULL; message2 = ""; switch (mod) { case MOD_SUICIDE: message = "suicides"; break; case MOD_FALLING: message = "cratered"; break; case MOD_CRUSH: message = "was squished"; break; case MOD_WATER: message = "sank like a rock"; break; case MOD_SLIME: message = "melted"; break; case MOD_LAVA: message = "does a back flip into the lava"; break; case MOD_EXPLOSIVE: case MOD_BARREL: message = "blew up"; break; case MOD_EXIT: message = "found a way out"; break; case MOD_TARGET_LASER: message = "saw the light"; break; case MOD_TARGET_BLASTER: message = "got blasted"; break; case MOD_BOMB: case MOD_SPLASH: case MOD_TRIGGER_HURT: message = "was in the wrong place"; break; } if (attacker == self) { switch (mod) { case MOD_HELD_GRENADE: message = "tried to put the pin back in"; break; case MOD_HG_SPLASH: case MOD_G_SPLASH: if (IsNeutral(self)) message = "tripped on its own grenade"; else if (IsFemale(self)) message = "tripped on her own grenade"; else message = "tripped on his own grenade"; break; case MOD_R_SPLASH: if (IsNeutral(self)) message = "blew itself up"; else if (IsFemale(self)) message = "blew herself up"; else message = "blew himself up"; break; case MOD_BFG_BLAST: message = "should have used a smaller gun"; break; default: if (IsNeutral(self)) message = "killed itself"; else if (IsFemale(self)) message = "killed herself"; else message = "killed himself"; break; } } if (message) { gi.bprintf (PRINT_MEDIUM, "%s %s.\n", self->client->pers.netname, message); if (deathmatch->value) self->client->resp.score--; self->enemy = NULL; return; } self->enemy = attacker; if (attacker && attacker->client) { switch (mod) { case MOD_BLASTER: message = "was blasted by"; break; case MOD_SHOTGUN: message = "was gunned down by"; break; case MOD_SSHOTGUN: message = "was blown away by"; message2 = "'s super shotgun"; break; case MOD_MACHINEGUN: message = "was machinegunned by"; break; case MOD_CHAINGUN: message = "was cut in half by"; message2 = "'s chaingun"; break; case MOD_GRENADE: message = "was popped by"; message2 = "'s grenade"; break; case MOD_G_SPLASH: message = "was shredded by"; message2 = "'s shrapnel"; break; case MOD_ROCKET: message = "ate"; message2 = "'s rocket"; break; case MOD_R_SPLASH: message = "almost dodged"; message2 = "'s rocket"; break; case MOD_HYPERBLASTER: message = "was melted by"; message2 = "'s hyperblaster"; break; case MOD_RAILGUN: message = "was railed by"; break; case MOD_BFG_LASER: message = "saw the pretty lights from"; message2 = "'s BFG"; break; case MOD_BFG_BLAST: message = "was disintegrated by"; message2 = "'s BFG blast"; break; case MOD_BFG_EFFECT: message = "couldn't hide from"; message2 = "'s BFG"; break; case MOD_HANDGRENADE: message = "caught"; message2 = "'s handgrenade"; break; case MOD_HG_SPLASH: message = "didn't see"; message2 = "'s handgrenade"; break; case MOD_HELD_GRENADE: message = "feels"; message2 = "'s pain"; break; case MOD_TELEFRAG: message = "tried to invade"; message2 = "'s personal space"; break; } if (message) { gi.bprintf (PRINT_MEDIUM,"%s %s %s%s\n", self->client->pers.netname, message, attacker->client->pers.netname, message2); if (deathmatch->value) { if (ff) attacker->client->resp.score--; else attacker->client->resp.score++; } return; } } } gi.bprintf (PRINT_MEDIUM,"%s died.\n", self->client->pers.netname); if (deathmatch->value) self->client->resp.score--; }
void ClientObituary (edict_t *self, edict_t *inflictor, edict_t *attacker) { int mod; char *message; char *message2; qboolean ff; if (coop->value && attacker->client) meansOfDeath |= MOD_FRIENDLY_FIRE; if (attacker != self && attacker->svflags & SVF_MONSTER) { struct monsterObit *ptr = obits; while (ptr->classname != NULL) { if (Q_stricmp(attacker->classname, ptr->classname) == 0) { #ifdef WITH_ACEBOT safe_bprintf #else gi.bprintf #endif (PRINT_MEDIUM, ptr->message, self->client->pers.netname); return; } ptr++; } } if (deathmatch->value || coop->value) { ff = meansOfDeath & MOD_FRIENDLY_FIRE; mod = meansOfDeath & ~MOD_FRIENDLY_FIRE; message = NULL; message2 = ""; switch (mod) { case MOD_SUICIDE: message = "suicides"; break; case MOD_FALLING: message = "cratered"; break; case MOD_CRUSH: message = "was squished"; break; case MOD_WATER: message = "sank like a rock"; break; case MOD_SLIME: message = "melted"; break; case MOD_LAVA: message = "does a back flip into the lava"; break; case MOD_EXPLOSIVE: case MOD_BARREL: message = "blew up"; break; case MOD_EXIT: message = "found a way out"; break; case MOD_TARGET_LASER: message = "saw the light"; break; case MOD_TARGET_BLASTER: message = "got blasted"; break; case MOD_BOMB: case MOD_SPLASH: case MOD_TRIGGER_HURT: case MOD_AUTOCANNON: message = "was in the wrong place"; break; } if (attacker == self) { switch (mod) { case MOD_HELD_GRENADE: message = "tried to put the pin back in"; break; case MOD_HG_SPLASH: case MOD_G_SPLASH: if (IsFemale(self)) message = "tripped on her own grenade"; else message = "tripped on his own grenade"; break; case MOD_R_SPLASH: if (IsFemale(self)) message = "blew herself up"; else message = "blew himself up"; break; case MOD_BFG_BLAST: message = "should have used a smaller gun"; break; case MOD_A2K: message = "realized he was expendable"; break; case MOD_SONICCANNON: message = "got carried away"; break; default: if (IsFemale(self)) message = "killed herself"; else message = "killed himself"; break; } } if (message) { #ifdef WITH_ACEBOT safe_bprintf #else gi.bprintf #endif (PRINT_MEDIUM, "%s %s.\n", self->client->pers.netname, message); if (deathmatch->value) self->client->resp.score--; self->enemy = NULL; return; } self->enemy = attacker; if (attacker && attacker->client) { switch (mod) { case MOD_BLASTER: message = "was blasted by"; break; case MOD_SHOTGUN: message = "was gunned down by"; break; case MOD_SSHOTGUN: message = "was blown away by"; message2 = "'s super shotgun"; break; case MOD_MACHINEGUN: message = "was machinegunned by"; break; case MOD_CHAINGUN: message = "was cut in half by"; message2 = "'s chaingun"; break; case MOD_GRENADE: message = "was popped by"; message2 = "'s grenade"; break; case MOD_G_SPLASH: message = "was shredded by"; message2 = "'s shrapnel"; break; case MOD_ROCKET: message = "ate"; message2 = "'s rocket"; break; case MOD_R_SPLASH: message = "almost dodged"; message2 = "'s rocket"; break; case MOD_HYPERBLASTER: message = "was melted by"; message2 = "'s hyperblaster"; break; case MOD_RAILGUN: message = "was railed by"; break; case MOD_BFG_LASER: message = "saw the pretty lights from"; message2 = "'s BFG"; break; case MOD_BFG_BLAST: message = "was disintegrated by"; message2 = "'s BFG blast"; break; case MOD_BFG_EFFECT: message = "couldn't hide from"; message2 = "'s BFG"; break; case MOD_HANDGRENADE: message = "caught"; message2 = "'s handgrenade"; break; case MOD_HG_SPLASH: message = "didn't see"; message2 = "'s handgrenade"; break; case MOD_HELD_GRENADE: message = "feels"; message2 = "'s pain"; break; case MOD_TELEFRAG: message = "tried to invade"; message2 = "'s personal space"; break; case MOD_SNIPERRIFLE: message = "was ventilated by"; message2 = "'s bullet"; break; case MOD_TRIPBOMB: message = "tripped over"; message2 = "'s trip bomb"; break; case MOD_FLARE: message = "didn't see"; message2 = "'s flare"; break; case MOD_GL_POLYBLEND: message = "turned off gl_polyblend and was damaged by"; message2 = "'s flare"; break; case MOD_A2K: message = "got dissassembled by"; message2 = ""; break; case MOD_SONICCANNON: message = "got microwaved by"; message2 = ""; break; } if (message) { #ifdef WITH_ACEBOT safe_bprintf #else gi.bprintf #endif (PRINT_MEDIUM,"%s %s %s%s\n", self->client->pers.netname, message, attacker->client->pers.netname, message2); if (deathmatch->value) { #ifdef WITH_ACEBOT //botchat> if (botchat->value && attacker->client && attacker != self) { bTaunt(attacker, self); bInsult(attacker, self); } //<botchat #endif if (ff) attacker->client->resp.score--; else attacker->client->resp.score++; } return; } } } #ifdef WITH_ACEBOT safe_bprintf #else gi.bprintf #endif (PRINT_MEDIUM,"%s died.\n", self->client->pers.netname); if (deathmatch->value) self->client->resp.score--; }
void Cmd_Partner_f (edict_t * ent) { edict_t *target; char *genderstr; if (!teamplay->value) { if (!((int) (dmflags->value) & (DF_MODELTEAMS | DF_SKINTEAMS))) return; // don't allow in a non-team setup... } if (ent->deadflag == DEAD_DEAD || ent->solid == SOLID_NOT) return; if (ent->client->resp.radio_partner && !ent->client->resp.radio_partner->inuse) { // just in case RadioThink hasn't caught it yet... avoid any problems ent->client->resp.radio_partner = NULL; } if (ent->client->resp.radio_partner) { gi.centerprintf (ent, "You already have a partner, %s", ent->client->resp.radio_partner->client->pers.netname); return; } target = DetermineViewedTeammate (ent); if (target == NULL) { gi.centerprintf (ent, "No potential partner selected"); return; } if (target->client->resp.radio_partner) { gi.centerprintf (ent, "%s already has a partner", target->client->pers.netname); return; } if (target->client->resp.partner_last_offered_to == ent && ent->client->resp.partner_last_offered_from == target) { gi.centerprintf (ent, "%s is now your partner", target->client->pers.netname); gi.centerprintf (target, "%s is now your partner", ent->client->pers.netname); ent->client->resp.radio_partner = target; target->client->resp.radio_partner = ent; ent->client->resp.partner_last_offered_from = NULL; target->client->resp.partner_last_offered_to = NULL; return; } if (target->client->resp.partner_last_denied_from == ent) { gi.centerprintf (ent, "%s has already denied you", target->client->pers.netname); return; } if (target == ent->client->resp.partner_last_offered_to) { if (IsFemale (target)) genderstr = "her"; else if (IsNeutral (target)) genderstr = "it"; else genderstr = "him"; gi.centerprintf (ent, "Already awaiting confirmation from %s", genderstr); return; } if (IsFemale (ent)) genderstr = "her"; else if (IsNeutral (ent)) genderstr = "it"; else genderstr = "him"; gi.centerprintf (ent, "Awaiting confirmation from %s", target->client->pers.netname); gi.centerprintf (target, "%s offers to be your partner\n" "To accept:\nView %s and use the 'partner' command\n" "To deny:\nUse the 'deny' command", ent->client->pers.netname, genderstr); ent->client->resp.partner_last_offered_to = target; target->client->resp.partner_last_offered_from = ent; }