GS-EntBase: prevent light entities from overriding the first built-in lightstyles.

worldspawn: Assign two more lightstyles that Half-Life registers.
This commit is contained in:
Marco Cawthorne 2022-12-30 13:53:42 -08:00
parent 1bd9a5ea01
commit 4322f1fd93
Signed by: eukara
GPG key ID: CE2032F0A2882A22
2 changed files with 4 additions and 2 deletions

View file

@ -138,7 +138,7 @@ light::RestoreComplete(void)
{ {
if (m_iEnabled == 0) { if (m_iEnabled == 0) {
lightstyle(m_flStyle, "a"); lightstyle(m_flStyle, "a");
} else { } else if (m_flStyle > 12) {
lightstyle(m_flStyle, m_strPattern); lightstyle(m_flStyle, m_strPattern);
} }
} }

View file

@ -83,7 +83,7 @@ ClientDisconnect(void)
/* this will hide/remove the player from other clients */ /* this will hide/remove the player from other clients */
player pl = (player)self; player pl = (player)self;
pl.SetModelindex(0); pl.Disappear();
} }
/** Called by the `kill` console command. /** Called by the `kill` console command.
@ -484,6 +484,8 @@ worldspawn(void)
lightstyle(9, "aaaaaaaazzzzzzzz"); lightstyle(9, "aaaaaaaazzzzzzzz");
lightstyle(10, "mmamammmmammamamaaamammma"); lightstyle(10, "mmamammmmammamamaaamammma");
lightstyle(11, "abcdefghijklmnopqrrqponmlkjihgfedcba"); lightstyle(11, "abcdefghijklmnopqrrqponmlkjihgfedcba");
lightstyle(12, "mmnnmmnnnmmnn");
lightstyle(63, "a");
Skill_Init(); Skill_Init();
precache_model("models/error.vvm"); precache_model("models/error.vvm");