diff --git a/dlls/gamerules.cpp b/dlls/gamerules.cpp index 613c51ff..58ea4294 100644 --- a/dlls/gamerules.cpp +++ b/dlls/gamerules.cpp @@ -27,6 +27,7 @@ #include "CGamePlayerEquip.h" #include "CBasePlayerItem.h" #include "PluginManager.h" +#include "game.h" #include #include @@ -141,6 +142,7 @@ void execMapCfg() { "mp_bulletsponges", "mp_bulletspongemax", "mp_maxmonsterrespawns", + "mp_mergemodels", "killnpc", "mp_npckill", "startarmor", @@ -258,6 +260,12 @@ void execMapCfg() { continue; } + // must know this value now to know what to precache during this frame + if (name == "mp_mergemodels") { + mp_mergemodels.value = atoi(value.c_str()) != 0; + continue; + } + // map plugins need to be loaded now in case they define custom entities used in the bsp data if (name == "map_plugin") { g_pluginManager.AddPlugin(value.c_str(), true); @@ -302,6 +310,21 @@ void execServerCfg() { continue; } + vector parts = splitString(line, " \t"); + + if (parts.empty()) { + continue; + } + + string name = trimSpaces(toLowerCase(parts[0])); + string value = sanitize_cvar_value(parts.size() > 1 ? trimSpaces(parts[1]) : ""); + + // must know this value now to know what to precache during this frame (todo: duplicated in map cfg logic) + if (name == "mp_mergemodels") { + mp_mergemodels.value = atoi(value.c_str()) != 0; + continue; + } + SERVER_COMMAND(UTIL_VarArgs("%s\n", line.c_str())); } diff --git a/dlls/weapon/CBasePlayerItem.cpp b/dlls/weapon/CBasePlayerItem.cpp index 9545169c..f4cd0635 100644 --- a/dlls/weapon/CBasePlayerItem.cpp +++ b/dlls/weapon/CBasePlayerItem.cpp @@ -44,7 +44,8 @@ void CBasePlayerItem::SetObjectCollisionBox(void) //========================================================= void CBasePlayerItem::FallInit(void) { - pev->movetype = MOVETYPE_TOSS; + if (pev->movetype == 0) + pev->movetype = MOVETYPE_TOSS; pev->solid = SOLID_TRIGGER; UTIL_SetOrigin(pev, pev->origin); diff --git a/dlls/weapon/CBasePlayerWeapon.cpp b/dlls/weapon/CBasePlayerWeapon.cpp index 307d2173..6716fa80 100644 --- a/dlls/weapon/CBasePlayerWeapon.cpp +++ b/dlls/weapon/CBasePlayerWeapon.cpp @@ -672,6 +672,7 @@ CBaseEntity* CBasePlayerWeapon::Respawn(void) wep->m_customModelV = m_customModelV; wep->m_customModelP = m_customModelP; wep->m_customModelW = m_customModelW; + wep->pev->movetype = pev->movetype; SET_MODEL(wep->edict(), GetModelW()); }