Skip to content

Commit

Permalink
Merge pull request #182 from actionquake/bug/ifdef-aqtion-logcapture
Browse files Browse the repository at this point in the history
Set ifdef's on USE_AQTION, check on LogCapture
  • Loading branch information
darkshade9 authored Apr 9, 2024
2 parents 01b1b72 + e352f5f commit fccf353
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
2 changes: 2 additions & 0 deletions source/a_ctf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1409,5 +1409,7 @@ void CTFCapReward(edict_t * ent)
}
else gi.cprintf(ent, PRINT_MEDIUM, "CAPTURED!\n\nYou have been rewarded.\n\nNow go get some more!");

#ifdef USE_AQTION
LogCapture(ent);
#endif
}
2 changes: 2 additions & 0 deletions source/a_dom.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ void DomFlagThink( edict_t *flag )
flag->owner->client->resp.dom_capstreak++;
if (flag->owner->client->resp.dom_capstreak > flag->owner->client->resp.dom_capstreakbest)
flag->owner->client->resp.dom_capstreakbest = flag->owner->client->resp.dom_capstreak;
#ifdef USE_AQTION
LogCapture(flag->owner);
#endif

if( (dom_team_flags[ flag->owner->client->resp.team ] == dom_flag_count) && (dom_flag_count > 1) )
gi.bprintf( PRINT_HIGH, "%s TEAM IS DOMINATING!\n",
Expand Down
3 changes: 2 additions & 1 deletion source/a_esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,9 @@ void _EspBonusCapture(edict_t *attacker, edict_t *flag)
flag->owner->client->resp.esp_capstreak++;
if (flag->owner->client->resp.esp_capstreak > flag->owner->client->resp.esp_capstreakbest)
flag->owner->client->resp.esp_capstreakbest = flag->owner->client->resp.esp_capstreak;
#ifdef USE_AQTION
LogCapture(flag->owner);

#endif
// Bonus points awarded
flag->owner->client->resp.score += ESP_LEADER_CAPTURE_BONUS;

Expand Down
6 changes: 3 additions & 3 deletions source/a_team.c
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,7 @@ void JoinTeam (edict_t * ent, int desired_team, int skip_menuclose)
AddToTransparentList (ent);
}

#if USE_AQTION
#ifdef USE_AQTION
if (in_warmup && warmup_bots->value) {
PutClientInServer (ent);
}
Expand Down Expand Up @@ -2313,7 +2313,7 @@ void RunWarmup ()
gi.centerprintf(ent, "WARMUP");
}
}
#if USE_AQTION
#ifdef USE_AQTION
if (warmup_bots->value){
gi.cvar_forceset("am", "1");
gi.cvar_forceset("am_botcount", warmup_bots->string);
Expand Down Expand Up @@ -2799,7 +2799,7 @@ int CheckTeamRules (void)
gi.sound (&g_edicts[0], CHAN_VOICE | CHAN_NO_PHS_ADD,
gi.soundindex ("world/10_0.wav"), 1.0, ATTN_NONE, 0.0);

#if USE_AQTION
#ifdef USE_AQTION
// Cleanup and remove all bots, it's go time!
if (warmup_bots->value){
gi.cvar_forceset("am", "0");
Expand Down
6 changes: 3 additions & 3 deletions source/g_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ void ProduceShotgunDamageReport(edict_t*);

//tng_stats.c
void StatBotCheck(void);
#if USE_AQTION
#ifdef USE_AQTION
void LogKill(edict_t *self, edict_t *inflictor, edict_t *attacker);
void LogWorldKill(edict_t *self);
void LogCapture(edict_t *capturer);
Expand Down Expand Up @@ -1733,7 +1733,7 @@ typedef struct
ignorelist_t ignorelist;
gitem_t *chosenItem2; // Support for item kit mode

#if USE_AQTION
#ifdef USE_AQTION
char steamid[24];
char discordid[24];
#endif
Expand Down Expand Up @@ -2325,7 +2325,7 @@ typedef struct
gitem_t *weapon;
gitem_t *item;
// Extended stats
#if USE_AQTION
#ifdef USE_AQTION
char steamid[24];
char discordid[24];
#endif
Expand Down
4 changes: 2 additions & 2 deletions source/p_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -3260,7 +3260,7 @@ qboolean ClientConnect(edict_t * ent, char *userinfo)
Q_strncpyz(ent->client->pers.ip, ipaddr_buf, sizeof(ent->client->pers.ip));
Q_strncpyz(ent->client->pers.userinfo, userinfo, sizeof(ent->client->pers.userinfo));

#if USE_AQTION
#ifdef USE_AQTION
value = Info_ValueForKey(userinfo, "steamid");
if (*value)
Q_strncpyz(ent->client->pers.steamid, value, sizeof(ent->client->pers.steamid));
Expand Down Expand Up @@ -3430,7 +3430,7 @@ void CreateGhost(edict_t * ent)

strcpy(ghost->ip, ent->client->pers.ip);
strcpy(ghost->netname, ent->client->pers.netname);
#if USE_AQTION
#ifdef USE_AQTION
strcpy(ghost->steamid, ent->client->pers.steamid);
strcpy(ghost->discordid, ent->client->pers.discordid);
#endif
Expand Down
1 change: 1 addition & 0 deletions source/tng_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@ void LogWorldKill(edict_t *self)
LogCapture
=================
*/

void LogCapture(edict_t *capturer)
{
int eventtime;
Expand Down

0 comments on commit fccf353

Please sign in to comment.