From 29d3404bb092c2b001046e1817f840bb87b72204 Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Sat, 23 Jul 2022 14:26:52 -0700 Subject: [PATCH] Add decore_labstuff, decore_sack and it'll apparently attach to monster_tube_embryo --- src/server/decore_labstuff.qc | 38 +++++++++++++++++++++++++ src/server/decore_sack.qc | 46 +++++++++++++++++++++++++++++++ src/server/monster_tube_embryo.qc | 42 +++++++++++++++++++++++++--- src/server/progs.src | 2 ++ 4 files changed, 124 insertions(+), 4 deletions(-) create mode 100644 src/server/decore_labstuff.qc create mode 100644 src/server/decore_sack.qc diff --git a/src/server/decore_labstuff.qc b/src/server/decore_labstuff.qc new file mode 100644 index 0000000..271b19f --- /dev/null +++ b/src/server/decore_labstuff.qc @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2016-2022 Marco Cawthorne + * + * 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. + */ + +/*QUAKED decore_labstuff (0 0.8 0.8) (-16 -16 0) (16 16 64) +This is a decorative entity from Gunman Chronicles. + +-------- KEYS -------- +"targetname" : Name + +-------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY -------- +model="models/swampstuff.mdl" +*/ + +class decore_labstuff:RWDecore +{ + void(void) decore_labstuff; +}; + +void +decore_labstuff::decore_labstuff(void) +{ + model = "models/labstuff.mdl"; + mins = [-16, -16, 0]; + maxs = [16, 16, 64]; +} diff --git a/src/server/decore_sack.qc b/src/server/decore_sack.qc new file mode 100644 index 0000000..06f4f16 --- /dev/null +++ b/src/server/decore_sack.qc @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2016-2022 Marco Cawthorne + * + * 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. + */ + +/*QUAKED decore_sack (0 0.8 0.8) (-16 -16 0) (16 16 64) +This is a decorative entity from Gunman Chronicles. + +-------- KEYS -------- +"targetname" : Name + +-------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY -------- +model="models/sack.mdl" +*/ + +class decore_sack:RWDecore +{ + void(void) decore_sack; + virtual void(void) Respawn; +}; + +void +decore_sack::Respawn(void) +{ + super::Respawn(); + SetMovetype(MOVETYPE_NONE); +} + +void +decore_sack::decore_sack(void) +{ + model = "models/sack.mdl"; + mins = [-16, -16, 0]; + maxs = [16, 16, 64]; +} diff --git a/src/server/monster_tube_embryo.qc b/src/server/monster_tube_embryo.qc index 846c9e6..dcbe006 100644 --- a/src/server/monster_tube_embryo.qc +++ b/src/server/monster_tube_embryo.qc @@ -14,7 +14,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/*QUAKED monster_tube_embryo (0 0.8 0.8) (-16 -16 0) (16 16 72) +/*QUAKED monster_tube_embryo (0 0.8 0.8) (-12 -12 -16) (16 16 24) This is a monster entity from Gunman Chronicles. -------- KEYS -------- @@ -26,13 +26,47 @@ model="models/tubryo.mdl" class monster_tube_embryo:NSMonster { + decore_sack sack; void(void) monster_tube_embryo; + + virtual void(void) ParentUpdate; + virtual void(void) Spawned; + virtual void(void) Respawn; }; void -monster_tube_embryo:: monster_tube_embryo(void) +monster_tube_embryo::ParentUpdate(void) +{ + super::ParentUpdate(); + + sack.SetOrigin(GetOrigin()); + sack.SetAngles(GetAngles()); +} + +void +monster_tube_embryo::Spawned(void) +{ + super::Spawned(); + + if (!sack) + sack = spawn(decore_sack); + + sack.SetRenderMode(RM_COLOR); + sack.SetRenderAmt(0.75f); +} + +void +monster_tube_embryo::Respawn(void) +{ + SetModel(GetSpawnModel()); + SetMovetype(MOVETYPE_FLY); + SetOrigin(GetSpawnOrigin()); +} + +void +monster_tube_embryo::monster_tube_embryo(void) { model = "models/tubryo.mdl"; - base_mins = [-16,-16,0]; - base_maxs = [16,16,72]; + base_mins = [-12,-12,-16]; + base_maxs = [12,12,24]; } diff --git a/src/server/progs.src b/src/server/progs.src index f5708f6..43a6115 100644 --- a/src/server/progs.src +++ b/src/server/progs.src @@ -36,6 +36,7 @@ decore_gutspile.qc decore_hatgib.qc decore_ice.qc decore_icebeak.qc +decore_labstuff.qc decore_mushroom.qc decore_mushroom2.qc decore_nest.qc @@ -43,6 +44,7 @@ decore_pipes.qc decore_prickle.qc decore_pteradon.qc decore_sittingtubemortar.qc +decore_sack.qc decore_swampplants.qc decore_torchflame.qc decore_torch.qc