Skip to content

Commit

Permalink
Merge branch 'sync/aq2-tng' of github.com:actionquake/q2pro into sync…
Browse files Browse the repository at this point in the history
…/aq2-tng-extensions
  • Loading branch information
darkshade9 committed Oct 6, 2024
2 parents 6e77efb + b60233c commit fae2693
Show file tree
Hide file tree
Showing 12 changed files with 297 additions and 61 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/subprojects/*/
!/subprojects/packagefiles/
/tags
/TAGS
/.vs/*
Expand Down
4 changes: 2 additions & 2 deletions src/action/a_esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ void EspCapturePointThink( edict_t *flag )

// Escort point captured, end round and start again
gi.sound( &g_edicts[0], CHAN_BODY | CHAN_NO_PHS_ADD, gi.soundindex("aqdt/aqg_bosswin.wav"), 1.0, ATTN_NONE, 0.0 );
espsettings.escortcap = flag->owner->client->resp.team;
// espsettings.escortcap = flag->owner->client->resp.team;
if (esp_punish->value) {
esp_punishment_phase = true;
EspPunishment(OtherTeam(flag->owner->client->resp.team));
Expand Down Expand Up @@ -532,7 +532,7 @@ void EspResetCapturePoint(void)
edict_t *flag = NULL;

// Reset escortcap value
espsettings.escortcap = false;
espsettings.escortcap = false;

// Find the flag
while ((ent = G_Find(ent, FOFS(classname), "item_flag")) != NULL) {
Expand Down
52 changes: 28 additions & 24 deletions src/action/botlib/botlib_esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int BOTLIB_ESPGetTargetNode(edict_t *ent, edict_t* leader)
edict_t *target = NULL;

// Reset escortcap value
espsettings.escortcap = false;
//espsettings.escortcap = false;

// If leader is null, it means we're looking for an ETV target
if(leader == NULL) {
Expand Down Expand Up @@ -110,9 +110,9 @@ int BOTLIB_ESPGetTargetNode(edict_t *ent, edict_t* leader)
}

if(leader == NULL)
gi.dprintf("%s: there are no nodes near ETV target\n", __func__);
BOTLIB_Debug("%s: there are no nodes near ETV target\n", __func__);
else
gi.dprintf("%s: there are no nodes near the leader\n", __func__);
BOTLIB_Debug("%s: there are no nodes near the leader\n", __func__);
return INVALID;
}

Expand Down Expand Up @@ -266,27 +266,31 @@ int BOTLIB_InterceptLeader_3Team(edict_t* self)

int BOTLIB_InterceptLeader_2Team(edict_t* self)
{
int myTeam = self->client->resp.team;
int espMode = EspModeCheck();

if (espMode == ESPMODE_ATL) {
if (myTeam == TEAM1) {
if (IS_ALIVE(EspGetLeader(TEAM2))) {
return BOTLIB_FindEnemyLeaderNode(self, TEAM2);
}
} else {
if (IS_ALIVE(EspGetLeader(TEAM1))) {
return BOTLIB_FindEnemyLeaderNode(self, TEAM1);
}
}
} else if (espMode == ESPMODE_ETV) {
if (myTeam == TEAM2) {
if (IS_ALIVE(EspGetLeader(TEAM1))) {
return BOTLIB_ESPGetTargetNode(self, NULL);
}
}
}
return INVALID; // No team leaders are alive, so no node to intercept
int myTeam = self->client->resp.team;
int espMode = EspModeCheck();
edict_t* leader;

if (espMode == ESPMODE_ATL) {
if (myTeam == TEAM1) {
leader = EspGetLeader(TEAM2);
if (leader != NULL && IS_ALIVE(leader)) {
return BOTLIB_FindEnemyLeaderNode(self, TEAM2);
}
} else {
leader = EspGetLeader(TEAM1);
if (leader != NULL && IS_ALIVE(leader)) {
return BOTLIB_FindEnemyLeaderNode(self, TEAM1);
}
}
} else if (espMode == ESPMODE_ETV) {
if (myTeam == TEAM2) {
leader = EspGetLeader(TEAM1);
if (leader != NULL && IS_ALIVE(leader)) {
return BOTLIB_ESPGetTargetNode(self, NULL);
}
}
}
return INVALID; // No team leaders are alive, so no node to intercept
}

int BOTLIB_InterceptLeader_ETV(edict_t* self)
Expand Down
6 changes: 2 additions & 4 deletions subprojects/khr-headers.wrap
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[wrap-file]
directory = khr-headers-20220530
source_url = https://skuller.net/meson/khr-headers-20220530.zip
source_filename = khr-headers-20220530.zip
source_hash = c90019de9f55afae8e6a8b15ae4e23d921b98c1571af9fcfd5525df059a160f3
directory = khr-headers
source_filename = khr-headers.tar.xz
12 changes: 5 additions & 7 deletions subprojects/libcurl.wrap
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
[wrap-file]
directory = curl-8.9.1
source_url = https://curl.se/download/curl-8.9.1.tar.xz
source_filename = curl-8.9.1.tar.xz
source_hash = f292f6cc051d5bbabf725ef85d432dfeacc8711dd717ea97612ae590643801e5
patch_url = https://skuller.net/meson/libcurl_8.9.1-1_patch.zip
patch_filename = libcurl_8.9.1-1_patch.zip
patch_hash = b7f4ef775d912da335387b222dc1caf421fb434cc36aeee84a032fb28cac5c77
directory = curl-8.10.1
source_url = https://curl.se/download/curl-8.10.1.tar.xz
source_filename = curl-8.10.1.tar.xz
source_hash = 73a4b0e99596a09fa5924a4fb7e4b995a85fda0d18a2c02ab9cf134bebce04ee
patch_directory = curl

[provide]
libcurl = libcurl_dep
18 changes: 9 additions & 9 deletions subprojects/libjpeg-turbo.wrap
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[wrap-file]
directory = libjpeg-turbo-3.0.3
source_url = https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.0.3/libjpeg-turbo-3.0.3.tar.gz
source_filename = libjpeg-turbo-3.0.3.tar.gz
source_hash = 343e789069fc7afbcdfe44dbba7dbbf45afa98a15150e079a38e60e44578865d
patch_filename = libjpeg-turbo_3.0.3-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/libjpeg-turbo_3.0.3-1/get_patch
patch_hash = 8bbf4f205e54e73c48c14dae7fcc71f152cdc8fea6d55a1af1e3108d10c6a2e4
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/libjpeg-turbo_3.0.3-1/libjpeg-turbo-3.0.3.tar.gz
wrapdb_version = 3.0.3-1
directory = libjpeg-turbo-3.0.4
source_url = https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.0.4/libjpeg-turbo-3.0.4.tar.gz
source_filename = libjpeg-turbo-3.0.4.tar.gz
source_hash = 99130559e7d62e8d695f2c0eaeef912c5828d5b84a0537dcb24c9678c9d5b76b
patch_filename = libjpeg-turbo_3.0.4-2_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/libjpeg-turbo_3.0.4-2/get_patch
patch_hash = f12d14c6ff4ae83eddc1a2e8cfd96a9b7a40b6bdc8ff345ca8094abf4c3da928
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/libjpeg-turbo_3.0.4-2/libjpeg-turbo-3.0.4.tar.gz
wrapdb_version = 3.0.4-2

[provide]
dependency_names = libjpeg, libturbojpeg
16 changes: 8 additions & 8 deletions subprojects/libpng.wrap
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[wrap-file]
directory = libpng-1.6.43
source_url = https://downloads.sourceforge.net/libpng/libpng-1.6.43.tar.xz
source_filename = libpng-1.6.43.tar.xz
source_hash = 6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c
patch_filename = libpng_1.6.43-2_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/libpng_1.6.43-2/get_patch
patch_hash = 49951297edf03e81d925ab03726555f09994ad1ed78fb539a269216430eef3da
wrapdb_version = 1.6.43-2
directory = libpng-1.6.44
source_url = https://downloads.sourceforge.net/libpng/libpng-1.6.44.tar.xz
source_filename = libpng-1.6.44.tar.xz
source_hash = 60c4da1d5b7f0aa8d158da48e8f8afa9773c1c8baa5d21974df61f1886b8ce8e
patch_filename = libpng_1.6.44-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/libpng_1.6.44-1/get_patch
patch_hash = 394b07614c45fbd1beac8b660386216a490fe12f841a1a445799b676c9c892fb
wrapdb_version = 1.6.44-1

[provide]
libpng = libpng_dep
13 changes: 6 additions & 7 deletions subprojects/openal-soft.wrap
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[wrap-file]
directory = openal-soft-1.22.2
source_url = https://github.com/kcat/openal-soft/releases/download/1.22.2/openal-soft-1.22.2.tar.bz2
source_filename = openal-soft-1.22.2.tar.bz2
source_hash = ae94cc95cda76b7cc6e92e38c2531af82148e76d3d88ce996e2928a1ea7c3d20
patch_url = https://skuller.net/meson/openal-soft_1.22.2-1_patch.zip
patch_filename = openal-soft_1.22.2-1_patch.zip
patch_hash = 8f0df33a04aec9fbac053476a9d68fd201bc74ed6ba62fce00138b71eb583db0
directory = openal-soft-1.23.1
source_url = https://github.com/kcat/openal-soft/releases/download/1.23.1/openal-soft-1.23.1.tar.bz2
source_fallback_url = https://openal-soft.org/openal-releases/openal-soft-1.23.1.tar.bz2
source_filename = openal-soft-1.23.1.tar.bz2
source_hash = 796f4b89134c4e57270b7f0d755f0fa3435b90da437b745160a49bd41c845b21
patch_directory = openal-soft

[provide]
openal = openal_dep
Loading

0 comments on commit fae2693

Please sign in to comment.