From 34ea0e654aa5f778c8c2f45c6d958913a48f1816 Mon Sep 17 00:00:00 2001 From: Aaron Dean <8dino2@gmail.com> Date: Thu, 7 Sep 2023 13:07:15 -0400 Subject: [PATCH] More fixes --- actionlite/action/a_radio.cpp | 18 +++++++-------- actionlite/action/a_radio.h | 2 +- actionlite/action/a_team.cpp | 6 ++--- actionlite/g_local.h | 4 +++- actionlite/g_spawn.cpp | 6 +++++ actionlite/g_turret.cpp | 4 ++-- actionlite/p_client.cpp | 15 +++++++++++++ actionlite/q_std.h | 42 +++++++++++++++-------------------- 8 files changed, 57 insertions(+), 40 deletions(-) diff --git a/actionlite/action/a_radio.cpp b/actionlite/action/a_radio.cpp index 2481c41..6ea50a0 100644 --- a/actionlite/action/a_radio.cpp +++ b/actionlite/action/a_radio.cpp @@ -593,16 +593,16 @@ void Cmd_Deny_f (edict_t * ent) } } -void Cmd_Say_partner_f (edict_t * ent) -{ - if (ent->client->resp.radio.partner == NULL) - { - gi.LocClient_Print (ent, PRINT_HIGH, "You don't have a partner.\n"); - return; - } +// void Cmd_Say_partner_f (edict_t * ent) +// { +// if (ent->client->resp.radio.partner == NULL) +// { +// gi.LocClient_Print (ent, PRINT_HIGH, "You don't have a partner.\n"); +// return; +// } - Cmd_Say_f (ent, false, false, true); -} +// Cmd_Say_f (ent, false, false, true); +// } //SLIC2 Redesigned and optimized these two functions diff --git a/actionlite/action/a_radio.h b/actionlite/action/a_radio.h index ca7a7bd..0caef75 100644 --- a/actionlite/action/a_radio.h +++ b/actionlite/action/a_radio.h @@ -70,7 +70,7 @@ void Cmd_Radio_power_f (edict_t *); void Cmd_Radiopartner_f (edict_t *); void Cmd_Radioteam_f (edict_t *); void Cmd_Channel_f (edict_t *); -void Cmd_Say_partner_f (edict_t *); +//void Cmd_Say_partner_f (edict_t *); void Cmd_Partner_f (edict_t *); void Cmd_Deny_f (edict_t *); void Cmd_Unpartner_f (edict_t *); diff --git a/actionlite/action/a_team.cpp b/actionlite/action/a_team.cpp index 1daef01..7e3b4c9 100644 --- a/actionlite/action/a_team.cpp +++ b/actionlite/action/a_team.cpp @@ -1149,7 +1149,7 @@ int TeamHasPlayers (int team) return players; } -int _numclients( void ); // a_vote.c +//int _numclients( void ); // a_vote.c bool TeamsReady( void ) { @@ -1175,8 +1175,8 @@ bool BothTeamsHavePlayers() return false; //AQ2:TNG END - if( ! _numclients() ) - return false; + // if( ! _numclients() ) + // return false; for (i = 0; i < game.maxclients; i++) { diff --git a/actionlite/g_local.h b/actionlite/g_local.h index e7bf934..e0b9093 100644 --- a/actionlite/g_local.h +++ b/actionlite/g_local.h @@ -1789,7 +1789,7 @@ extern cvar_t *warmup; extern cvar_t *rrot; extern cvar_t *vrot; extern cvar_t *e_enhancedSlippers; -extern mod_id_t meansOfDeath; +//extern mod_id_t meansOfDeath; // zucc for hitlocation of death extern int locOfDeath; @@ -1802,6 +1802,8 @@ bool CheckForUnevenTeams (edict_t *); bool IsAllowedToJoin(edict_t *, int); void TransparentListSet (solid_t solid_type); + + // Action Add end extern edict_t *g_edicts; diff --git a/actionlite/g_spawn.cpp b/actionlite/g_spawn.cpp index 0e526d4..7675738 100644 --- a/actionlite/g_spawn.cpp +++ b/actionlite/g_spawn.cpp @@ -437,6 +437,12 @@ static const std::initializer_list spawns = { }; // clang-format on +//AQ2:TNG - Slicer New location code +int ml_count = 0; +char ml_creator[101]; +//AQ2:TNG END +placedata_t locationbase[MAX_LOCATIONS_IN_BASE]; + /* =============== ED_CallSpawn diff --git a/actionlite/g_turret.cpp b/actionlite/g_turret.cpp index 6ad9e54..e3ecfbe 100644 --- a/actionlite/g_turret.cpp +++ b/actionlite/g_turret.cpp @@ -408,7 +408,7 @@ THINK(turret_driver_link) (edict_t *self) -> void self->flags |= FL_TEAMSLAVE; } -void InfantryPrecache(); +//void InfantryPrecache(); void SP_turret_driver(edict_t *self) { @@ -418,7 +418,7 @@ void SP_turret_driver(edict_t *self) return; } - InfantryPrecache(); + //InfantryPrecache(); self->movetype = MOVETYPE_PUSH; self->solid = SOLID_BBOX; diff --git a/actionlite/p_client.cpp b/actionlite/p_client.cpp index d31e519..66e59c1 100644 --- a/actionlite/p_client.cpp +++ b/actionlite/p_client.cpp @@ -2376,6 +2376,21 @@ void G_PostRespawn(edict_t *self) self->client->respawn_time = level.time; } +void CleanBodies() +{ + int i; + edict_t *ent; + + ent = g_edicts + game.maxclients + 1; + for (i = 0; i < BODY_QUEUE_SIZE; i++, ent++) { + gi.unlinkentity( ent ); + ent->solid = SOLID_NOT; + ent->movetype = MOVETYPE_NOCLIP; + ent->svflags |= SVF_NOCLIENT; + } + level.body_que = 0; +} + void respawn(edict_t *self) { if (deathmatch->integer || coop->integer) diff --git a/actionlite/q_std.h b/actionlite/q_std.h index 3e63469..02e94cb 100644 --- a/actionlite/q_std.h +++ b/actionlite/q_std.h @@ -219,7 +219,25 @@ size_t Q_strlcat(char* dst, const char* src, size_t siz); // Action Add //====================================================================== +//void AddPointToBounds (const vec3_t v, vec3_t mins, vec3_t maxs); +vec3_t VectorNormalize (vec3_t v); // returns vector length +vec3_t VectorNormalize2 (const vec3_t v, vec3_t out); +int Q_log2 (int val); + +void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3]); +void R_ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4]); + +//void AngleVectors (const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up); +int BoxOnPlaneSide (const vec3_t emins, const vec3_t emaxs, const struct cplane_s *plane); +float anglemod (float a); +//float LerpAngle (float a1, float a2, float frac); + +#define Q_isupper( c ) ( (c) >= 'A' && (c) <= 'Z' ) +#define Q_islower( c ) ( (c) >= 'a' && (c) <= 'z' ) +#define Q_isdigit( c ) ( (c) >= '0' && (c) <= '9' ) +#define Q_isalpha( c ) ( Q_isupper( c ) || Q_islower( c ) ) +#define Q_isalnum( c ) ( Q_isalpha( c ) || Q_isdigit( c ) ) //====================================================================== // Action Add End @@ -255,28 +273,4 @@ size_t Q_strlcat(char* dst, const char* src, size_t siz); #define ClearBounds(mins,maxs) ((mins)[0]=(mins)[1]=(mins)[2]=99999,(maxs)[0]=(maxs)[1]=(maxs)[2]=-99999) - -//void AddPointToBounds (const vec3_t v, vec3_t mins, vec3_t maxs); -vec3_t VectorNormalize (vec3_t v); // returns vector length -vec3_t VectorNormalize2 (const vec3_t v, vec3_t out); - -int Q_log2 (int val); - -void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3]); -void R_ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4]); - -//void AngleVectors (const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up); -int BoxOnPlaneSide (const vec3_t emins, const vec3_t emaxs, const struct cplane_s *plane); -float anglemod (float a); -//float LerpAngle (float a1, float a2, float frac); - -#define Q_isupper( c ) ( (c) >= 'A' && (c) <= 'Z' ) -#define Q_islower( c ) ( (c) >= 'a' && (c) <= 'z' ) -#define Q_isdigit( c ) ( (c) >= '0' && (c) <= '9' ) -#define Q_isalpha( c ) ( Q_isupper( c ) || Q_islower( c ) ) -#define Q_isalnum( c ) ( Q_isalpha( c ) || Q_isdigit( c ) ) - -char *Q_strlwr( char *s ); -char *Q_strupr( char *s ); - // EOF