light: Make sure we're overriding patterns if switch_style is above 0 and

below 11. You also want to go update worldspawn/vmap...
This commit is contained in:
Marco Cawthorne 2020-12-09 16:47:43 +01:00
parent c130ab2c38
commit fbc2aaeeec
5 changed files with 7 additions and 21 deletions

View file

@ -297,23 +297,6 @@ CSQC_UpdateView(float w, float h, float focus)
setproperty(VF_DRAWWORLD, 1);
if (g_skyscale != 0 && g_skypos) {
vector porg;
vector realpos;
porg = getproperty(VF_ORIGIN);
if (autocvar_dev_skyscale) {
realpos[0] = porg[0] / autocvar_dev_skyscale;
realpos[1] = porg[1] / autocvar_dev_skyscale;
realpos[2] = porg[2] / autocvar_dev_skyscale;
} else {
realpos[0] = porg[0] / g_skyscale;
realpos[1] = porg[1] / g_skyscale;
realpos[2] = porg[2] / g_skyscale;
}
setproperty(VF_SKYROOM_CAMERA, g_skypos + realpos);
}
/* draw the viewmodel in a second pass if desired */
if (autocvar_r_viewmodelpass) {
renderscene();

View file

@ -166,7 +166,7 @@ light::light(void)
CBaseTrigger::CBaseTrigger();
/* switch styles before 12 are builtins from Quake. */
if (m_flSwitchStyle <= 11) {
if (m_flSwitchStyle > 0 && m_flSwitchStyle <= 11) {
m_strPattern = getlightstyle(m_flSwitchStyle);
}
}

View file

@ -60,8 +60,10 @@ point_camera::Input(entity eAct, string strInput, string strData)
m_flFOV = stof(strInput);
break;
case "SetOnAndTurnOthersOff":
for (point_camera e = world; e = (point_camera)find(e, ::classname, "point_camera");)
e.m_iValue = FALSE;
for (entity e = world; (e = find(e, ::classname, "point_camera"));) {
point_camera p = (point_camera)e;
p.m_iValue = FALSE;
}
m_iValue = TRUE;
break;

View file

@ -1,4 +1,4 @@
/*
/*
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
*
* Permission to use, copy, modify, and distribute this software for any

View file

@ -6,6 +6,7 @@
../../shared/valve/animations.h
../../shared/valve/animations.c
../../shared/valve/pmove.c
../../shared/valve/pmove_water.c
../../shared/valve/fx_blood.c
../../shared/valve/fx_breakmodel.c