From 99c737b245e76c13def52a9b2e44bb231bc3ade5 Mon Sep 17 00:00:00 2001 From: Dino <8dino2@gmail.com> Date: Mon, 4 Sep 2023 20:14:05 -0400 Subject: [PATCH] Hopefully fixing teams --- actionlite/a_team.h | 12 ++++-------- actionlite/g_local.h | 4 ++-- actionlite/p_client.cpp | 7 ++++--- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/actionlite/a_team.h b/actionlite/a_team.h index 44baa3f..c060a75 100644 --- a/actionlite/a_team.h +++ b/actionlite/a_team.h @@ -1,13 +1,9 @@ #include "g_local.h" -enum aqteam_t -{ - NOTEAM, - TEAM1, - TEAM2, - TEAM3 -}; - +#define NOTEAM 0 +#define TEAM1 1 +#define TEAM2 2 +#define TEAM3 3 #define MAX_TEAMS 3 #define TEAM_TOP (MAX_TEAMS+1) diff --git a/actionlite/g_local.h b/actionlite/g_local.h index 8685b84..76cc27c 100644 --- a/actionlite/g_local.h +++ b/actionlite/g_local.h @@ -1954,7 +1954,6 @@ extern gitem_t itemlist[IT_TOTAL]; #define CROUCHING_VIEWHEIGHT 8 #define STANDING_VIEWHEIGHT 22 -extern aqteam_t teams[TEAM_TOP]; int32_t gameSettings; // Round based, deathmatch, etc? extern cvar_t *allitem; @@ -2959,8 +2958,9 @@ struct team_t int32_t pauses_used, wantReset; cvar_t *teamscore; }; +extern team_t teams[TEAM_TOP]; -// Action ADd +// Action Add // [Paril-KEX] seconds until we are fully invisible after // making a racket diff --git a/actionlite/p_client.cpp b/actionlite/p_client.cpp index 60dd0ad..abb2980 100644 --- a/actionlite/p_client.cpp +++ b/actionlite/p_client.cpp @@ -66,7 +66,7 @@ void Add_Frag(edict_t * ent, int mod) ent->client->resp.gunstats[mod].kills++; } // Grenade splash, kicks and punch damage - if (mod.id > 0 && ((mod.id == MOD_HG_SPLASH) || (mod.id == MOD_KICK) || (mod.id == MOD_PUNCH))) { + if (mod > 0 && ((mod == MOD_HG_SPLASH) || (mod == MOD_KICK) || (mod == MOD_PUNCH))) { ent->client->resp.gunstats[mod].kills++; } @@ -614,7 +614,8 @@ void ClientObituary(edict_t *self, edict_t *inflictor, edict_t *attacker, mod_t { //snprintf( death_msg, sizeof(death_msg), message); //sprintf( death_msg, message ); - death_msg = message; + + strdup(death_msg, message); PrintDeathMessage(death_msg, self ); if (!teamplay->value || team_round_going || !ff_afterround->value) { @@ -909,7 +910,7 @@ void ClientObituary(edict_t *self, edict_t *inflictor, edict_t *attacker, mod_t { //sprintf(death_msg, "%s%s %s%s\n", self->client->pers.netname, message, attacker->client->pers.netname, message2); //snprintf(death_msg, sizeof(death_msg), message); - death_msg = message; + strdup(death_msg, message); PrintDeathMessage(death_msg, self); AddKilledPlayer(attacker, self);