diff --git a/src/gs-entbase/client.src b/src/gs-entbase/client.src index 4b2b6d0c..22736ec5 100644 --- a/src/gs-entbase/client.src +++ b/src/gs-entbase/client.src @@ -23,4 +23,5 @@ client/sky_camera.qc client/info_notnull.qc client/point_message.qc client/prop_rope.qc +client/prop_static.qc #endlist diff --git a/src/gs-entbase/client/prop_static.qc b/src/gs-entbase/client/prop_static.qc new file mode 100644 index 00000000..eeb08257 --- /dev/null +++ b/src/gs-entbase/client/prop_static.qc @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2016-2022 Vera Visions L.L.C. + * + * 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 +prop_static:NSEntity +{ + void(void) prop_static; + + virtual void(string, string) SpawnKey; +}; + +void +prop_static::SpawnKey(string strKey, string strValue) +{ + switch (strKey) { + case "modelscale": + scale = stof(strValue); + break; + default: + super::SpawnKey(strKey, strValue); + } +} + +void +prop_static::prop_static(void) +{ + drawmask = MASK_ENGINE; + Init(); + + solid = SOLID_NOT; + setmodel(this, model); + setorigin(this, origin); + setsize(this, mins * scale, maxs * scale); + makestatic(this); +} diff --git a/src/gs-entbase/server.src b/src/gs-entbase/server.src index 23701a19..45da184a 100644 --- a/src/gs-entbase/server.src +++ b/src/gs-entbase/server.src @@ -62,7 +62,6 @@ server/player_weaponstrip.qc server/player_loadsaved.qc server/prop_physics.qc server/prop_dynamic.qc -server/prop_static.qc server/point_camera.qc server/targ_speaker.qc server/target_cdaudio.qc