From 12753616dfc4998b5df920bfddd4f99949fc9b5f Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Thu, 30 Sep 2021 23:32:47 +0200 Subject: [PATCH] Remove some left-over junk code that no longer runs --- src/client/include.src | 1 - src/client/npc.qc | 103 ----------------------------------------- src/shared/entities.h | 18 ------- 3 files changed, 122 deletions(-) delete mode 100644 src/client/npc.qc diff --git a/src/client/include.src b/src/client/include.src index d5c4e04f..0c72eca6 100644 --- a/src/client/include.src +++ b/src/client/include.src @@ -12,7 +12,6 @@ titles.qc text.qc player.qc predict.qc -npc.qc entities.qc modelevent.qc view.qc diff --git a/src/client/npc.qc b/src/client/npc.qc deleted file mode 100644 index 0c47c35f..00000000 --- a/src/client/npc.qc +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2016-2020 Marco Hladik - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER - * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -class -CBaseNPC:CBaseEntity -{ - int body; - float frame_last; - - virtual float() predraw; - virtual void(float flChanged) ReceiveEntity; -}; - -float -CBaseNPC::predraw(void) -{ -#ifdef GS_RENDERFX - RenderFXPass(); -#endif - - if (lerpfrac > 0) { - lerpfrac -= frametime * 5; - if (lerpfrac < 0) { - lerpfrac = 0; - } - } - - if (frame != frame_last) { - frame2time = frame1time; - frame2 = frame_last; - frame_last = frame; - lerpfrac = 1.0f; - frame1time = 0.0f; - } - - frame2time += clframetime; - frame1time += clframetime; - - - ProcessWordQue(); - - addentity(this); - return (PREDRAW_NEXT); -} - -void -CBaseNPC::ReceiveEntity(float fl) -{ - if (fl & NPC_MODELINDEX) - modelindex = readshort(); - if (fl & NPC_ORIGIN_X) - origin[0] = readcoord(); - if (fl & NPC_ORIGIN_Y) - origin[1] = readcoord(); - if (fl & NPC_ORIGIN_Z) - origin[2] = readcoord(); - if (fl & NPC_ANGLES_X) - angles[0] = readfloat(); - if (fl & NPC_ANGLES_Y) - angles[1] = readfloat(); - if (fl & NPC_ANGLES_Z) - angles[2] = readfloat(); - if (fl & NPC_VELOCITY_X) - velocity[0] = readcoord(); - if (fl & NPC_VELOCITY_Y) - velocity[1] = readcoord(); - if (fl & NPC_VELOCITY_Z) - velocity[2] = readcoord(); - if (fl & NPC_FRAME) - frame = readbyte(); - if (fl & NPC_SKIN) - skin = readbyte(); - - if (fl & NPC_BODY) { - body = readbyte(); - setcustomskin(this, "", sprintf("geomset 1 %i\n", body)); - } - - setorigin(this, origin); -} - -void -CBaseNPC::CBaseNPC(void) -{ - solid = SOLID_SLIDEBOX; - movetype = MOVETYPE_NONE; - drawmask = MASK_ENGINE; - customphysics = Empty; - setsize(this, VEC_HULL_MIN + [0,0,36], VEC_HULL_MAX + [0,0,36]); -} diff --git a/src/shared/entities.h b/src/shared/entities.h index d09894cb..b253b845 100644 --- a/src/shared/entities.h +++ b/src/shared/entities.h @@ -37,21 +37,3 @@ enum ENT_VEH_4WHEEL, ENT_SEPARATOR, }; - -/* entity update flags */ -enumflags -{ - NPC_MODELINDEX, - NPC_ORIGIN_X, - NPC_ORIGIN_Y, - NPC_ORIGIN_Z, - NPC_ANGLES_X, - NPC_ANGLES_Y, - NPC_ANGLES_Z, - NPC_VELOCITY_X, - NPC_VELOCITY_Y, - NPC_VELOCITY_Z, - NPC_FRAME, - NPC_SKIN, - NPC_BODY -};