From 49a147c18a05ef28017ff195a55c3ff94bd08a68 Mon Sep 17 00:00:00 2001 From: Aaron Dean <8dino2@gmail.com> Date: Wed, 6 Sep 2023 15:35:01 -0400 Subject: [PATCH] Added xgame.cpp --- actionlite/CMakeLists.txt | 1 + actionlite/action/a_game.h | 1 - actionlite/g_ai.cpp | 4 ++-- actionlite/g_local.h | 5 +++-- actionlite/g_turret.cpp | 16 ++++++++-------- actionlite/p_hud.cpp | 6 +++--- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/actionlite/CMakeLists.txt b/actionlite/CMakeLists.txt index 3da6554..38667f3 100644 --- a/actionlite/CMakeLists.txt +++ b/actionlite/CMakeLists.txt @@ -10,6 +10,7 @@ set(GAME_SRC ${CMAKE_CURRENT_SOURCE_DIR}/action/a_game.cpp ${CMAKE_CURRENT_SOURCE_DIR}/action/a_team.cpp ${CMAKE_CURRENT_SOURCE_DIR}/action/a_balancer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/action/a_xgame.cpp ${CMAKE_CURRENT_SOURCE_DIR}/bots/bot_debug.cpp ${CMAKE_CURRENT_SOURCE_DIR}/bots/bot_exports.cpp diff --git a/actionlite/action/a_game.h b/actionlite/action/a_game.h index 5b7d814..481d4c8 100644 --- a/actionlite/action/a_game.h +++ b/actionlite/action/a_game.h @@ -37,7 +37,6 @@ void GetNearbyTeammates (edict_t * self, char *buf); void ResetScores (bool playerScores); void AddKilledPlayer (edict_t * self, edict_t * ent); -void VideoCheckClient (edict_t * ent); //AQ2:TNG END //TempFile void GetLastLoss (edict_t * self, char *buf, char team); diff --git a/actionlite/g_ai.cpp b/actionlite/g_ai.cpp index e3ef4e6..5a1b4da 100644 --- a/actionlite/g_ai.cpp +++ b/actionlite/g_ai.cpp @@ -1614,8 +1614,8 @@ void ai_run(edict_t *self, float dist) { // check for hint_paths. self->monsterinfo.last_hint_time = level.time; - if (monsterlost_checkhint(self)) - return; + // if (monsterlost_checkhint(self)) + // return; } } // PGM diff --git a/actionlite/g_local.h b/actionlite/g_local.h index 12fba2b..5875a45 100644 --- a/actionlite/g_local.h +++ b/actionlite/g_local.h @@ -11,6 +11,7 @@ #include "action/a_game.h" #include "action/cgf_sfx_glass.h" #include "action/a_radio.h" +#include "action/a_xgame.h" // the "gameversion" client command will print this plus compile date constexpr const char *GAMEVERSION = "action"; @@ -2149,7 +2150,7 @@ void ChangeWeapon(edict_t *ent); void SpawnItem(edict_t *ent, gitem_t *item); void Think_Weapon(edict_t *ent); item_id_t ArmorIndex(edict_t *ent); -item_id_t PowerArmorType(edict_t *ent); +//item_id_t PowerArmorType(edict_t *ent); gitem_t *GetItemByIndex(item_id_t index); gitem_t *GetItemByAmmo(ammo_t ammo); gitem_t *GetItemByPowerup(powerup_t powerup); @@ -2704,7 +2705,7 @@ enum class blocked_jump_result_t }; blocked_jump_result_t blocked_checkjump(edict_t *self, float dist); -bool monsterlost_checkhint(edict_t *self); +//bool monsterlost_checkhint(edict_t *self); bool inback(edict_t *self, edict_t *other); float realrange(edict_t *self, edict_t *other); edict_t *SpawnBadArea(const vec3_t &mins, const vec3_t &maxs, gtime_t lifespan, edict_t *owner); diff --git a/actionlite/g_turret.cpp b/actionlite/g_turret.cpp index 2eb406f..6ad9e54 100644 --- a/actionlite/g_turret.cpp +++ b/actionlite/g_turret.cpp @@ -279,10 +279,10 @@ Must NOT be on the team with the rest of the turret parts. Instead it must target the turret_breach. */ -void infantry_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, const vec3_t &point, const mod_t &mod); -void infantry_stand(edict_t *self); -void infantry_pain(edict_t *self, edict_t *other, float kick, int damage, const mod_t &mod); -void infantry_setskin(edict_t *self); +// void infantry_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, const vec3_t &point, const mod_t &mod); +// void infantry_stand(edict_t *self); +// void infantry_pain(edict_t *self, edict_t *other, float kick, int damage, const mod_t &mod); +// void infantry_setskin(edict_t *self); DIE(turret_driver_die) (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, const vec3_t &point, const mod_t &mod) -> void { @@ -312,7 +312,7 @@ DIE(turret_driver_die) (edict_t *self, edict_t *inflictor, edict_t *attacker, in self->think = monster_think; } - infantry_die(self, inflictor, attacker, damage, point, mod); + //infantry_die(self, inflictor, attacker, damage, point, mod); G_FixStuckObject(self, self->s.origin); AngleVectors(self->s.angles, self->velocity, nullptr, nullptr); @@ -431,9 +431,9 @@ void SP_turret_driver(edict_t *self) self->mass = 200; self->viewheight = 24; - self->pain = infantry_pain; + //self->pain = infantry_pain; self->die = turret_driver_die; - self->monsterinfo.stand = infantry_stand; + //self->monsterinfo.stand = infantry_stand; self->flags |= FL_NO_KNOCKBACK; @@ -447,7 +447,7 @@ void SP_turret_driver(edict_t *self) self->clipmask = MASK_MONSTERSOLID; self->s.old_origin = self->s.origin; self->monsterinfo.aiflags |= AI_STAND_GROUND; - self->monsterinfo.setskin = infantry_setskin; + //self->monsterinfo.setskin = infantry_setskin; if (st.item) { diff --git a/actionlite/p_hud.cpp b/actionlite/p_hud.cpp index 2aab825..b0dedc6 100644 --- a/actionlite/p_hud.cpp +++ b/actionlite/p_hud.cpp @@ -783,9 +783,9 @@ void G_SetStats(edict_t *ent) // // armor // - power_armor_type = PowerArmorType(ent); - if (power_armor_type) - cells = ent->client->pers.inventory[IT_AMMO_CELLS]; + // power_armor_type = PowerArmorType(ent); + // if (power_armor_type) + // cells = ent->client->pers.inventory[IT_AMMO_CELLS]; //index = ArmorIndex(ent); // if (power_armor_type && (!index || (level.time.milliseconds() % 3000) < 1500))