mirror of
https://github.com/celisej567/Fake-CSM-Mapbase.git
synced 2026-09-11 20:08:41 +03:00
bebra2
This commit is contained in:
32
fgd/csm.fgd
Normal file
32
fgd/csm.fgd
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
@include "halflife2.fgd"
|
||||
|
||||
@PointClass base(Targetname, Parentname, Angles) studio("models/editor/cone_helper.mdl") frustum(lightfov,nearz,farz,lightcolor,-1) = env_cascade_light :
|
||||
"An entity to control the sunlight that casts cascaded shadows in the map."
|
||||
[
|
||||
spawnflags(flags) =
|
||||
[
|
||||
1 : "Enabled" : 1
|
||||
]
|
||||
|
||||
enableshadows(Choices) : "Enable Shadows" : 0 : "Enables/disables shadows from this projected texture." =
|
||||
[
|
||||
0 : "No"
|
||||
1 : "Yes"
|
||||
]
|
||||
lightcolor(color255) : "Light Color" : "255 255 255 200" : "Light Color RGB-Intensity"
|
||||
cameraspace(integer) : "Camera Space" : 0 : "Angles are interpreted as being relative to camera."
|
||||
|
||||
uselightenvangles(Choices) : "Use light_environment's angles" : 1 : "If true, the CSM shadow angles are automatically harvested from the light_environment's angles. If false, this entity's angles are used." =
|
||||
[
|
||||
1 : "Yes"
|
||||
0 : "No"
|
||||
]
|
||||
|
||||
ambient(integer) :"Ambient" : 0 : "idk"
|
||||
|
||||
input TurnOn(void) : "Turn on the texture"
|
||||
input TurnOff(void) : "Turn off the texture"
|
||||
input EnableShadows(bool) : "Turn off the shadows"
|
||||
input SpotlightTexture(string) : "Change texture"
|
||||
]
|
||||
@@ -340,7 +340,7 @@ CEnvCascadeLight::CEnvCascadeLight(void)
|
||||
m_bLightOnlyTarget = false;
|
||||
m_bLightWorld = true;
|
||||
m_bCameraSpace = false;
|
||||
EnableAngleFromEnv = true;
|
||||
EnableAngleFromEnv = false;
|
||||
|
||||
Q_strcpy(m_SpotlightTextureName.GetForModify(), "tools\\fakecsm\\mask_center");
|
||||
m_nSpotlightTextureFrame = 0;
|
||||
@@ -387,10 +387,11 @@ void CEnvCascadeLight::Preparation()
|
||||
{
|
||||
pEnv->angFEnv = true;
|
||||
SetLocalAngles(QAngle(90, 0, 0));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
pEnv->SetAbsAngles(QAngle(-GetLocalAngles().x, GetLocalAngles().y,-GetLocalAngles().z));
|
||||
pEnv->SetAbsAngles(QAngle(-(GetLocalAngles().x - 90), GetLocalAngles().y,-GetLocalAngles().z));
|
||||
|
||||
Msg("pEnv local angle = %f %f %f \n", pEnv->GetLocalAngles().x, pEnv->GetLocalAngles().y, pEnv->GetLocalAngles().z);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user