From 9656d9dff7f6d39970d448b2460a599fdc95afb9 Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Fri, 22 Jul 2022 17:38:17 -0700 Subject: [PATCH] decore_torch: will now spawn torchflame decore_cactus: update QUAKED comment --- src/server/decore_cactus.qc | 2 ++ src/server/decore_prickle.qc | 1 + src/server/decore_torch.qc | 15 +++++++++++++++ src/server/decore_torchflame.qc | 14 +++++++++++++- src/server/progs.src | 2 +- 5 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/server/decore_cactus.qc b/src/server/decore_cactus.qc index 347be06..01b6b3e 100644 --- a/src/server/decore_cactus.qc +++ b/src/server/decore_cactus.qc @@ -16,6 +16,8 @@ /*QUAKED decore_cactus (0 0.8 0.8) (-16 -16 0) (16 16 64) This is a decorative entity from Gunman Chronicles. +It will hurt the player whenever it gets touched. +The damage is 1 health point per second. -------- KEYS -------- "targetname" : Name diff --git a/src/server/decore_prickle.qc b/src/server/decore_prickle.qc index 17f7dd7..30304f6 100644 --- a/src/server/decore_prickle.qc +++ b/src/server/decore_prickle.qc @@ -35,4 +35,5 @@ decore_prickle::decore_prickle(void) model = "models/prickle.mdl"; mins = [-8, -8, 0]; maxs = [8, 8, 8]; + m_bDropToFloor = true; } diff --git a/src/server/decore_torch.qc b/src/server/decore_torch.qc index 9df25fc..58f2062 100644 --- a/src/server/decore_torch.qc +++ b/src/server/decore_torch.qc @@ -26,9 +26,24 @@ model="models/torch.mdl" class decore_torch:RWDecore { + decore_torchflame flame; + void(void) decore_torch; + + virtual void(void) Spawned; }; +void +decore_torch::Spawned(void) +{ + super::Spawned(); + + if (!flame) + flame = spawn(decore_torchflame); + + flame.origin = flame.m_oldOrigin = origin + [0,0,32]; +} + void decore_torch::decore_torch(void) { diff --git a/src/server/decore_torchflame.qc b/src/server/decore_torchflame.qc index 9486ccf..749371a 100644 --- a/src/server/decore_torchflame.qc +++ b/src/server/decore_torchflame.qc @@ -27,12 +27,24 @@ model="sprites/flames.spr" class decore_torchflame:RWDecore { void(void) decore_torchflame; + + virtual void(void) Respawn; }; +void +decore_torchflame::Respawn(void) +{ + super::Respawn(); + + SetRenderMode(RM_ADDITIVE); + SetRenderColor([1,1,1]); + SetRenderAmt(1.0f); +} + void decore_torchflame::decore_torchflame(void) { model = "sprites/flames.spr"; mins = [-4, -4, -8]; maxs = [4, 4, 16]; -} +} \ No newline at end of file diff --git a/src/server/progs.src b/src/server/progs.src index 18f8caa..f5708f6 100644 --- a/src/server/progs.src +++ b/src/server/progs.src @@ -44,8 +44,8 @@ decore_prickle.qc decore_pteradon.qc decore_sittingtubemortar.qc decore_swampplants.qc -decore_torch.qc decore_torchflame.qc +decore_torch.qc monster_cricket.qc monster_critter.qc