diff --git a/src/server/gamerules.h b/src/server/gamerules.h index e88b9d7..defc27c 100644 --- a/src/server/gamerules.h +++ b/src/server/gamerules.h @@ -16,7 +16,7 @@ #include "../../../src/server/gamerules.h" -class SHMultiplayerRules:CGameRules +class HLGameRules:CGameRules { float m_flRestockTimer; float m_flBreakRespawnTimer; @@ -34,6 +34,7 @@ class SHMultiplayerRules:CGameRules virtual void(base_player) LevelChangeParms; virtual void(void) LevelNewParms; virtual void(void) FrameStart; + virtual bool(void) IsMultiplayer; - void(void) SHMultiplayerRules; + void(void) HLGameRules; }; diff --git a/src/server/gamerules.qc b/src/server/gamerules.qc index 5e4b5dd..bb82b26 100644 --- a/src/server/gamerules.qc +++ b/src/server/gamerules.qc @@ -17,8 +17,14 @@ var int autocvar_sh_insanity = 10; var int autocvar_sv_playerkeepalive = TRUE; +bool +HLGameRules::IsMultiplayer(void) +{ + return true; +} + void -SHMultiplayerRules::PlayerDeath(base_player pl) +HLGameRules::PlayerDeath(base_player pl) { /* obituary networking */ WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET); @@ -65,7 +71,7 @@ SHMultiplayerRules::PlayerDeath(base_player pl) } void -SHMultiplayerRules::PlayerSpawn(base_player pp) +HLGameRules::PlayerSpawn(base_player pp) { player pl = (player)pp; /* this is where the mods want to deviate */ @@ -114,7 +120,7 @@ SHMultiplayerRules::PlayerSpawn(base_player pp) } void -SHMultiplayerRules::LevelDecodeParms(base_player pp) +HLGameRules::LevelDecodeParms(base_player pp) { player pl = (player)pp; g_landmarkpos[0] = parm1; @@ -159,7 +165,7 @@ SHMultiplayerRules::LevelDecodeParms(base_player pp) } void -SHMultiplayerRules::LevelChangeParms(base_player pp) +HLGameRules::LevelChangeParms(base_player pp) { player pl = (player)pp; parm1 = g_landmarkpos[0]; @@ -196,7 +202,7 @@ SHMultiplayerRules::LevelChangeParms(base_player pp) } void -SHMultiplayerRules::LevelNewParms(void) +HLGameRules::LevelNewParms(void) { parm1 = parm2 = parm3 = parm4 = parm5 = parm6 = parm7 = parm8 = parm9 = parm10 = parm11 = parm12 = parm13 = parm14 = @@ -209,7 +215,7 @@ SHMultiplayerRules::LevelNewParms(void) /* we check what fields have changed over the course of the frame and network * only the ones that have actually changed */ void -SHMultiplayerRules::PlayerPostFrame(base_player pp) +HLGameRules::PlayerPostFrame(base_player pp) { player pl = (player)pp; @@ -226,14 +232,14 @@ SHMultiplayerRules::PlayerPostFrame(base_player pp) } void -SHMultiplayerRules::PlayerConnect(base_player pl) +HLGameRules::PlayerConnect(base_player pl) { if (Plugin_PlayerConnect(pl) == FALSE) bprint(PRINT_HIGH, sprintf("%s connected\n", pl.netname)); } void -SHMultiplayerRules::PlayerDisconnect(base_player pl) +HLGameRules::PlayerDisconnect(base_player pl) { bprint(PRINT_HIGH, sprintf("%s disconnected\n", pl.netname)); @@ -247,14 +253,14 @@ SHMultiplayerRules::PlayerDisconnect(base_player pl) } void -SHMultiplayerRules::PlayerKill(base_player pp) +HLGameRules::PlayerKill(base_player pp) { player pl = (player)pp; Damage_Apply(pl, pl, pl.health, WEAPON_NONE, DMG_SKIP_ARMOR); } void -SHMultiplayerRules::ScientistKill(base_player pp, entity sci) +HLGameRules::ScientistKill(base_player pp, entity sci) { player pl = (player)pp; /* obituary networking */ @@ -293,7 +299,7 @@ SHMultiplayerRules::ScientistKill(base_player pp, entity sci) } void -SHMultiplayerRules::FrameStart(void) +HLGameRules::FrameStart(void) { entity e; @@ -326,7 +332,7 @@ SHMultiplayerRules::FrameStart(void) } void -SHMultiplayerRules::SHMultiplayerRules(void) +HLGameRules::HLGameRules(void) { CGameRules::CGameRules(); } diff --git a/src/server/monster_scientist.qc b/src/server/monster_scientist.qc index 94823e7..51b7c69 100644 --- a/src/server/monster_scientist.qc +++ b/src/server/monster_scientist.qc @@ -238,7 +238,7 @@ monster_scientist::Death(void) StartleAllies(); if (style != MONSTER_DEAD) { - SHMultiplayerRules rules = (SHMultiplayerRules)g_grMode; + HLGameRules rules = (HLGameRules)g_grMode; if (g_dmg_eAttacker.flags & FL_CLIENT) rules.ScientistKill((player)g_dmg_eAttacker, (entity)this); diff --git a/src/server/server.qc b/src/server/server.qc index a0523b2..92d32aa 100644 --- a/src/server/server.qc +++ b/src/server/server.qc @@ -17,7 +17,7 @@ void Game_InitRules(void) { - g_grMode = spawn(SHMultiplayerRules); + g_grMode = spawn(HLGameRules); } void diff --git a/src/shared/player.qc b/src/shared/player.qc index d015e6b..04f41b6 100644 --- a/src/shared/player.qc +++ b/src/shared/player.qc @@ -402,13 +402,11 @@ player::SendEntity float player::SendEntity(entity ePEnt, float fChanged) { - if (health <= 0 && ePEnt != this) { + /* don't broadcast invisible players */ + if (IsFakeSpectator() && ePEnt != this) return (0); - } - - if (clienttype(ePEnt) != CLIENTTYPE_REAL) { + if (!GetModelindex() && ePEnt != this) return (0); - } if (ePEnt != self) { fChanged &= ~PLAYER_ITEMS; diff --git a/zpak001.pk3dir/default.cfg b/zpak001.pk3dir/default.cfg index 3fa0da2..80a8dd5 100644 --- a/zpak001.pk3dir/default.cfg +++ b/zpak001.pk3dir/default.cfg @@ -43,3 +43,15 @@ seta "maxplayers" "8" seta "con_color" "255 255 215" seta "vgui_color" "255 255 215" seta "cross_color" "0 255 0" + +// disable some nuclide niceties +seta v_muzzledlight 0 + +// config compat +alias mp_timelimit timelimit +alias mp_fraglimit fraglimit + +// video settings +seta gl_overbright 0 +seta gl_ldr 1 +seta r_lightmap_format rgb8