diff --git a/source/server/entities/lights.qc b/source/server/entities/lights.qc index 33cada3..afdc1cd 100644 --- a/source/server/entities/lights.qc +++ b/source/server/entities/lights.qc @@ -95,4 +95,26 @@ void() light_torch_small_yellow = // Light with small flame & fire sound void() light_torch_large_yellow = // Light with larger flame & fire sound { Precache_Set("progs/flame2.mdl"); self.frame = 1; makestatic(self); } void() light_flame_small_white = // Light with small flame & fire sound -{ Precache_Set("progs/flame2.mdl"); makestatic(self); } \ No newline at end of file +{ Precache_Set("progs/flame2.mdl"); makestatic(self); } + +// +// -------------------- +// Spawnable Dynamic Lights +// -------------------- +// +#ifdef PC +void(entity what, float fullbright, float light_level, + float red, float green, float blue) Light_Custom = +{ + if (fullbright) + what.effects = what.effects | EF_FULLBRIGHT; + + { + what.pflags = PFLAGS_FULLDYNAMIC; + what.light_lev = light_level; + what.color_x = red; + what.color_y = green; + what.color_z = blue; + } +} +#endif diff --git a/source/server/entities/machines.qc b/source/server/entities/machines.qc index 5c1e851..13d62e1 100644 --- a/source/server/entities/machines.qc +++ b/source/server/entities/machines.qc @@ -155,27 +155,6 @@ void(entity e) Light_None = #endif } -// -// Light_Custom(e, r, g, b) -// For custom Perk Light Effects, generally not recommended -// unless you're testing a cool selection of colors and do not -// want to constantly recompile the client, or the client is -// inaccessible. Only functional on PC/FTE atm (TODO?) -// -void(entity e, float r, float g, float b) Light_Custom = -{ - e.effects = e.effects | EF_FULLBRIGHT; - #ifdef PC - { - e.pflags = PFLAGS_FULLDYNAMIC; - e.light_lev = 100; - e.color_x = r/255; - e.color_y = g/255; - e.color_z = b/255; - } - #endif -} - // // -------------------- // Core Perk System