From b3e340daaff6e03b2afbfce74ed31a1a1037ffc5 Mon Sep 17 00:00:00 2001 From: Dino <8dino2@gmail.com> Date: Thu, 31 Aug 2023 21:13:05 -0400 Subject: [PATCH] Removed more tech stuff take 2 --- actionlite/ctf/g_ctf.cpp | 144 +++++++++++++++++++-------------------- actionlite/g_cmds.cpp | 12 ++-- 2 files changed, 78 insertions(+), 78 deletions(-) diff --git a/actionlite/ctf/g_ctf.cpp b/actionlite/ctf/g_ctf.cpp index 1ce9730..7264b01 100644 --- a/actionlite/ctf/g_ctf.cpp +++ b/actionlite/ctf/g_ctf.cpp @@ -1782,29 +1782,29 @@ void CTFScoreboardMessage(edict_t *ent, edict_t *killer) /* TECH */ /*------------------------------------------------------------------------*/ -void CTFHasTech(edict_t *who) -{ - if (level.time - who->client->ctf_lasttechmsg > 2_sec) - { - gi.LocCenter_Print(who, "$g_already_have_tech"); - who->client->ctf_lasttechmsg = level.time; - } -} +// void CTFHasTech(edict_t *who) +// { +// if (level.time - who->client->ctf_lasttechmsg > 2_sec) +// { +// gi.LocCenter_Print(who, "$g_already_have_tech"); +// who->client->ctf_lasttechmsg = level.time; +// } +// } -gitem_t *CTFWhat_Tech(edict_t *ent) -{ - // int i; +// gitem_t *CTFWhat_Tech(edict_t *ent) +// { +// // int i; - // i = 0; - // for (; i < q_countof(tech_ids); i++) - // { - // if (ent->client->pers.inventory[tech_ids[i]]) - // { - // return GetItemByIndex(tech_ids[i]); - // } - // } - return nullptr; -} +// // i = 0; +// // for (; i < q_countof(tech_ids); i++) +// // { +// // if (ent->client->pers.inventory[tech_ids[i]]) +// // { +// // return GetItemByIndex(tech_ids[i]); +// // } +// // } +// return nullptr; +// } // bool CTFPickup_Tech(edict_t *ent, edict_t *other) // { @@ -1881,67 +1881,67 @@ gitem_t *CTFWhat_Tech(edict_t *ent) // } // } -static void SpawnTech(gitem_t *item, edict_t *spot) -{ - edict_t *ent; - vec3_t forward, right; - vec3_t angles; +// static void SpawnTech(gitem_t *item, edict_t *spot) +// { +// edict_t *ent; +// vec3_t forward, right; +// vec3_t angles; - ent = G_Spawn(); +// ent = G_Spawn(); - ent->classname = item->classname; - ent->item = item; - ent->spawnflags = SPAWNFLAG_ITEM_DROPPED; - ent->s.effects = item->world_model_flags; - ent->s.renderfx = RF_GLOW | RF_NO_LOD; - ent->mins = { -15, -15, -15 }; - ent->maxs = { 15, 15, 15 }; - gi.setmodel(ent, ent->item->world_model); - ent->solid = SOLID_TRIGGER; - ent->movetype = MOVETYPE_TOSS; - ent->touch = Touch_Item; - ent->owner = ent; +// ent->classname = item->classname; +// ent->item = item; +// ent->spawnflags = SPAWNFLAG_ITEM_DROPPED; +// ent->s.effects = item->world_model_flags; +// ent->s.renderfx = RF_GLOW | RF_NO_LOD; +// ent->mins = { -15, -15, -15 }; +// ent->maxs = { 15, 15, 15 }; +// gi.setmodel(ent, ent->item->world_model); +// ent->solid = SOLID_TRIGGER; +// ent->movetype = MOVETYPE_TOSS; +// ent->touch = Touch_Item; +// ent->owner = ent; - angles[0] = 0; - angles[1] = (float) irandom(360); - angles[2] = 0; +// angles[0] = 0; +// angles[1] = (float) irandom(360); +// angles[2] = 0; - AngleVectors(angles, forward, right, nullptr); - ent->s.origin = spot->s.origin; - ent->s.origin[2] += 16; - ent->velocity = forward * 100; - ent->velocity[2] = 300; +// AngleVectors(angles, forward, right, nullptr); +// ent->s.origin = spot->s.origin; +// ent->s.origin[2] += 16; +// ent->velocity = forward * 100; +// ent->velocity[2] = 300; - ent->nextthink = level.time + CTF_TECH_TIMEOUT; - ent->think = TechThink; +// ent->nextthink = level.time + CTF_TECH_TIMEOUT; +// ent->think = TechThink; - gi.linkentity(ent); -} +// gi.linkentity(ent); +// } -THINK(SpawnTechs) (edict_t *ent) -> void -{ - edict_t *spot; - int i; +// THINK(SpawnTechs) (edict_t *ent) -> void +// { +// edict_t *spot; +// int i; - i = 0; - for (; i < q_countof(tech_ids); i++) - { - if ((spot = FindTechSpawn()) != nullptr) - SpawnTech(GetItemByIndex(tech_ids[i]), spot); - } - if (ent) - G_FreeEdict(ent); -} +// i = 0; +// for (; i < q_countof(tech_ids); i++) +// { +// if ((spot = FindTechSpawn()) != nullptr) +// SpawnTech(GetItemByIndex(tech_ids[i]), spot); +// } +// if (ent) +// G_FreeEdict(ent); +// } -// frees the passed edict! -void CTFRespawnTech(edict_t *ent) -{ - edict_t *spot; +// // frees the passed edict! +// void CTFRespawnTech(edict_t *ent) +// { +// edict_t *spot; - if ((spot = FindTechSpawn()) != nullptr) - SpawnTech(ent->item, spot); - G_FreeEdict(ent); -} +// if ((spot = FindTechSpawn()) != nullptr) +// SpawnTech(ent->item, spot); +// G_FreeEdict(ent); +// } // void CTFSetupTechSpawn() // { diff --git a/actionlite/g_cmds.cpp b/actionlite/g_cmds.cpp index 3833ab4..04ad09d 100644 --- a/actionlite/g_cmds.cpp +++ b/actionlite/g_cmds.cpp @@ -948,12 +948,12 @@ void Cmd_Drop_f(edict_t *ent) return; // ZOID--special case for tech powerups - if (Q_strcasecmp(gi.args(), "tech") == 0 && (it = CTFWhat_Tech(ent)) != nullptr) - { - it->drop(ent, it); - ValidateSelectedItem(ent); - return; - } + // if (Q_strcasecmp(gi.args(), "tech") == 0 && (it = CTFWhat_Tech(ent)) != nullptr) + // { + // it->drop(ent, it); + // ValidateSelectedItem(ent); + // return; + // } // ZOID s = gi.args();