diff --git a/src/action/g_combat.c b/src/action/g_combat.c index b249c8cff..ceed11e23 100644 --- a/src/action/g_combat.c +++ b/src/action/g_combat.c @@ -957,10 +957,6 @@ void T_RadiusDamage (edict_t * inflictor, edict_t * attacker, float damage, edict_t *ent = NULL; vec3_t v; vec3_t dir; - char ent_name_list[1024] = ""; // Buffer to hold the names - int ent_count = 0; // Counter for the number of entities - qboolean selfharm = false; - while ((ent = findradius (ent, inflictor->s.origin, radius)) != NULL) { @@ -968,29 +964,6 @@ void T_RadiusDamage (edict_t * inflictor, edict_t * attacker, float damage, continue; if (!ent->takedamage) continue; - if (ent == attacker) - selfharm = true; - - // Messaging addition - if ((ent->client || ent->is_bot) && IS_ALIVE(ent) && ent != attacker){ - // Only add the name to the list if there are less than 4 names - if (ent_count < 4) - { - // Calculate the length of the new string - int new_length = strlen(ent_name_list) + strlen(" and ") + strlen(ent->client->pers.netname); - - // Check if the new string would fit in ent_name_list - if (new_length < sizeof(ent_name_list)) - { - if (ent_count > 0) - strncat(ent_name_list, " and ", sizeof(ent_name_list) - strlen(ent_name_list) - 1); - strncat(ent_name_list, ent->client->pers.netname, sizeof(ent_name_list) - strlen(ent_name_list) - 1); - } - } - ent_count++; - } - - // End messaging addition VectorAdd (ent->mins, ent->maxs, v); VectorMA (ent->s.origin, 0.5, v, v); @@ -1022,19 +995,4 @@ void T_RadiusDamage (edict_t * inflictor, edict_t * attacker, float damage, } } } - - // Grenade splash damage messaging - // Checks for attacker being NULL (this causes a cprintf segfault if NULL), and if the attacker is a client - // Also checks if the mod is a grenade splash. The game uses T_RadiusDamage for a variety of damaging effects - // so we only want to print the grenade splash messages if the mod is a grenade splash - if (attacker && attacker->client && mod == MOD_HG_SPLASH){ - if (ent_count > 3) - gi.cprintf(attacker, PRINT_HIGH, "You nailed several players with that grenade, nicely done!\n"); - else if (selfharm && ent_count > 0) - gi.cprintf(attacker, PRINT_HIGH, "You were blasted by your own grenade, along with %s\n", ent_name_list); - else if (selfharm) - gi.cprintf(attacker, PRINT_HIGH, "You were blasted by your own grenade, throw farther next time?\n"); - else if (ent_count > 0) - gi.cprintf(attacker, PRINT_HIGH, "%s was blasted by your grenade.\n", ent_name_list); - } }