diff --git a/meson.build b/meson.build index c7b8ae29c..af7026bc6 100644 --- a/meson.build +++ b/meson.build @@ -552,6 +552,8 @@ endif if get_option('aqtion-build') config.set10('USE_AQTION', true) + config.set10('AQTION_EXTENSION', true) + config.set10('AQTION_HUD', true) action_src += ltk_src action_src += botlib_src @@ -561,11 +563,6 @@ if get_option('aqtion-build') endif endif -if get_option('aqtion-extensions') - config.set10('AQTION_EXTENSION', true) - config.set10('AQTION_HUD', true) -endif - if get_option('discord-sdk') #if host_machine.system() == 'linux' if host_machine.cpu_family() == 'aarch64' # I am Linux ARM 64-bit diff --git a/meson_options.txt b/meson_options.txt index fc987229a..433b28f16 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -3,11 +3,6 @@ option('aqtion-build', value: true, description: 'Build-specific for AQtion enhancements') -option('aqtion-extensions', - type: 'boolean', - value: true, - description: 'Build-specific for AQtion extensions') - option('anticheat-server', type: 'boolean', value: false, diff --git a/src/action/g_local.h b/src/action/g_local.h index bc08dd568..b096fec76 100644 --- a/src/action/g_local.h +++ b/src/action/g_local.h @@ -1298,7 +1298,7 @@ extern cvar_t *esp_debug; // Enable or disable debug mode (very spammy) // 2023 extern cvar_t *use_killcounts; // Adjust how kill streaks are counted -extern cvar_t *am; // Enable or disable Attract Mode (ltk bots) (do not set this manually) +extern cvar_t *am; // Enable or disable Attract Mode (ltk bots) extern cvar_t *zoom_comp; // Enable or disable zoom compensation extern cvar_t *item_kit_mode; // Enable or disable item kit mode extern cvar_t *gun_dualmk23_enhance; // Enable or disable enhanced dual mk23s (laser + silencer) @@ -1701,12 +1701,14 @@ void StatBotCheck(void); void G_RegisterScore(void); int G_CalcRanks(gclient_t **ranks); void G_LoadScores(void); +#if USE_AQTION void LogKill(edict_t *self, edict_t *inflictor, edict_t *attacker); void LogWorldKill(edict_t *self); void LogCapture(edict_t *capturer); void LogMatch(void); void LogAward(edict_t *ent, int award); void LogEndMatchStats(void); +#endif //============================================================================ diff --git a/src/client/parse.c b/src/client/parse.c index dc75e03fb..0fbb44871 100644 --- a/src/client/parse.c +++ b/src/client/parse.c @@ -353,23 +353,19 @@ static void CL_ParseFrame(int extrabits) #endif // parse clientNum if (extraflags & EPS_CLIENTNUM) { - #if AQTION_EXTENSION if (cls.protocolVersion < PROTOCOL_VERSION_AQTION_CLIENTNUM_SHORT) { frame.clientNum = MSG_ReadByte(); } else { frame.clientNum = MSG_ReadShort(); } - #else - frame.clientNum = MSG_ReadByte(); // Default behavior if AQTION_EXTENSION is not defined - #endif if (!VALIDATE_CLIENTNUM(&cl.csr, frame.clientNum)) { Com_Error(ERR_DROP, "%s: bad clientNum", __func__); } } else if (oldframe) { frame.clientNum = oldframe->clientNum; - } else if (cls.serverProtocol > PROTOCOL_VERSION_DEFAULT) { - MSG_ParseDeltaPlayerstate_Enhanced(from, &frame.ps, bits, extraflags, cl.psFlags); } + } else if (cls.serverProtocol > PROTOCOL_VERSION_DEFAULT) { + MSG_ParseDeltaPlayerstate_Enhanced(from, &frame.ps, bits, extraflags, cl.psFlags); #if USE_DEBUG if (cl_shownet->integer > 2 && (bits || extraflags)) { Com_LPrintf(PRINT_DEVELOPER, " "); @@ -673,7 +669,6 @@ static void CL_ParseServerData(void) cl.serverstate = i; cinematic = i == ss_pic || i == ss_cinematic; } - #if AQTION_EXTENSION if (cls.protocolVersion >= PROTOCOL_VERSION_AQTION_EXTENDED_LIMITS) { i = MSG_ReadWord(); if (i & Q2PRO_PF_STRAFEJUMP_HACK) { @@ -693,7 +688,6 @@ static void CL_ParseServerData(void) cl.csr = cs_remap_new; } } else { - #endif if (MSG_ReadByte()) { Com_DPrintf("Q2PRO strafejump hack enabled\n"); cl.pmp.strafehack = true; @@ -706,9 +700,8 @@ static void CL_ParseServerData(void) Com_DPrintf("Q2PRO waterjump hack enabled\n"); cl.pmp.waterhack = true; } - #if AQTION_EXTENSION } - #endif + cl.esFlags |= MSG_ES_UMASK | MSG_ES_LONGSOLID; if (cls.protocolVersion >= PROTOCOL_VERSION_Q2PRO_BEAM_ORIGIN) { cl.esFlags |= MSG_ES_BEAMORIGIN; diff --git a/src/server/entities.c b/src/server/entities.c index 2f9b53132..5a6fb797d 100644 --- a/src/server/entities.c +++ b/src/server/entities.c @@ -560,8 +560,7 @@ bool SV_WriteFrameToClient_Aqtion(client_t *client, unsigned maxsize) MSG_WriteByte(svc_playerinfo); extraflags = MSG_WriteDeltaPlayerstate_Aqtion(oldstate, &frame->ps, psFlags); - #if AQTION_EXTENSION - if (client->protocol == PROTOCOL_VERSION_AQTION) { + if (client->protocol == PROTOCOL_VERSION_AQTION) { // delta encode the clientNum if ((oldframe ? oldframe->clientNum : 0) != frame->clientNum) { extraflags |= EPS_CLIENTNUM; @@ -572,7 +571,6 @@ bool SV_WriteFrameToClient_Aqtion(client_t *client, unsigned maxsize) } } } - #endif // save 3 high bits of extraflags *b1 = svc_frame | (((extraflags & 0x70) << 1)); diff --git a/src/server/user.c b/src/server/user.c index 14f07584c..1794c2183 100644 --- a/src/server/user.c +++ b/src/server/user.c @@ -430,18 +430,11 @@ void SV_New_f(void) } break; case PROTOCOL_VERSION_AQTION: - MSG_WriteShort(sv_client->version); - - #if AQTION_EXTENSION + MSG_WriteShort(sv_client->version); if (sv.state == ss_cinematic && sv_client->version < PROTOCOL_VERSION_AQTION_CINEMATICS) MSG_WriteByte(ss_pic); else MSG_WriteByte(sv.state); - #else - MSG_WriteByte(sv.state); // Default behavior if AQTION_EXTENSION is not defined - #endif - - #if AQTION_EXTENSION if (sv_client->version >= PROTOCOL_VERSION_AQTION_EXTENDED_LIMITS) { MSG_WriteShort(q2pro_protocol_flags()); } else { @@ -449,13 +442,7 @@ void SV_New_f(void) MSG_WriteByte(sv_client->pmp.qwmode); MSG_WriteByte(sv_client->pmp.waterhack); } - #else - MSG_WriteByte(sv_client->pmp.strafehack); // Default behavior if AQTION_EXTENSION is not defined - MSG_WriteByte(sv_client->pmp.qwmode); - MSG_WriteByte(sv_client->pmp.waterhack); - #endif - - break; + break; } SV_ClientAddMessage(sv_client, MSG_RELIABLE | MSG_CLEAR); @@ -506,11 +493,8 @@ void SV_New_f(void) if (sv_client->netchan.type == NETCHAN_OLD) { write_configstrings(); write_baselines(); - } else if ((sv_client->protocol == PROTOCOL_VERSION_Q2PRO && sv_client->version >= PROTOCOL_VERSION_Q2PRO_EXTENDED_LIMITS) - #if AQTION_EXTENSION - || (sv_client->protocol == PROTOCOL_VERSION_AQTION && sv_client->version >= PROTOCOL_VERSION_AQTION_EXTENDED_LIMITS) - #endif - ) { + } else if ((sv_client->protocol == PROTOCOL_VERSION_Q2PRO && sv_client->version >= PROTOCOL_VERSION_Q2PRO_EXTENDED_LIMITS) || + (sv_client->protocol == PROTOCOL_VERSION_AQTION && sv_client->version >= PROTOCOL_VERSION_AQTION_EXTENDED_LIMITS)) { write_configstring_stream(); write_baseline_stream(); } else { @@ -956,7 +940,6 @@ static void SV_PacketdupHack_f(void) #endif #if USE_AQTION -#if AQTION_EXTENSION static void SV_CvarSync_f(void) { if (!sv_client->edict->client) @@ -1009,7 +992,6 @@ static void SV_CvarSync_f(void) } } #endif -#endif static bool match_cvar_val(const char *s, const char *v) {