From 665572543f334d1cbacda96b828a45c563f86e3a Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Thu, 5 May 2022 19:14:17 -0700 Subject: [PATCH] prop_static: Support for the 'body' key. --- src/gs-entbase/client/prop_static.qc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gs-entbase/client/prop_static.qc b/src/gs-entbase/client/prop_static.qc index f1c461d6..795ba729 100644 --- a/src/gs-entbase/client/prop_static.qc +++ b/src/gs-entbase/client/prop_static.qc @@ -17,6 +17,8 @@ class prop_static:NSEntity { + int m_iBody; + void(void) prop_static; virtual void(string, string) SpawnKey; @@ -32,6 +34,9 @@ prop_static::SpawnKey(string strKey, string strValue) case "skin": skin = stof(strValue); break; + case "body": + m_iBody = stoi(strValue); + break; default: super::SpawnKey(strKey, strValue); } @@ -40,11 +45,14 @@ prop_static::SpawnKey(string strKey, string strValue) void prop_static::prop_static(void) { + float skindata; drawmask = MASK_ENGINE; Init(); solid = SOLID_NOT; setmodel(this, model); + skindata = loadcustomskin("", sprintf("geomset 0 %i\ngeomset 1 %i\n", m_iBody, m_iBody)); + applycustomskin(this, skindata); setorigin(this, origin); setsize(this, mins * scale, maxs * scale); makestatic(this);