env_shake: active global shake entities can be stopped by removing them from the game now.
This commit is contained in:
parent
a9b6f9a428
commit
a3268ef65b
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/ambient_generic.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/env_cubemap.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/info_intermission.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/info_landmark.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -3,6 +3,6 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
map $diffuse
|
map $diffuse
|
||||||
blendFunc blend
|
alphaFunc GE128
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
map $diffuse
|
map $diffuse
|
||||||
blendFunc blend
|
alphaFunc GE128
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/light.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
rgbGen vertex
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
map $diffuse
|
map $diffuse
|
||||||
blendFunc blend
|
alphaFunc GE128
|
||||||
rgbGen vertex
|
rgbGen vertex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
map $diffuse
|
map $diffuse
|
||||||
blendFunc blend
|
alphaFunc GE128
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
map $diffuse
|
map $diffuse
|
||||||
blendFunc blend
|
alphaFunc GE128
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/prop_door_rotating.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/scripted_sentence.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -3,6 +3,6 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
map $diffuse
|
map $diffuse
|
||||||
blendFunc blend
|
alphaFunc GE128
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -46,6 +46,8 @@ public:
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Trigger(entity, triggermode_t);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
|
virtual void OnRemoveEntity(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float m_flRadius;
|
float m_flRadius;
|
||||||
float m_flAmplitude;
|
float m_flAmplitude;
|
||||||
|
@ -62,6 +64,19 @@ env_shake::env_shake(void)
|
||||||
m_flFrequency = 0.0f;
|
m_flFrequency = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
env_shake::OnRemoveEntity(void)
|
||||||
|
{
|
||||||
|
if (HasSpawnFlags(1)) {
|
||||||
|
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
|
||||||
|
WriteByte(MSG_MULTICAST, EV_SHAKE);
|
||||||
|
WriteFloat(MSG_MULTICAST, 1.0);
|
||||||
|
WriteFloat(MSG_MULTICAST, m_flAmplitude);
|
||||||
|
WriteFloat(MSG_MULTICAST, m_flFrequency);
|
||||||
|
multicast([0,0,0], MULTICAST_ALL_R);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_shake::Save(float handle)
|
env_shake::Save(float handle)
|
||||||
{
|
{
|
||||||
|
@ -117,5 +132,14 @@ env_shake::SpawnKey(string strKey, string strValue)
|
||||||
void
|
void
|
||||||
env_shake::Trigger(entity act, triggermode_t state)
|
env_shake::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
Client_ShakeOnce(origin, m_flRadius, m_flDuration, m_flFrequency, m_flAmplitude);
|
if (HasSpawnFlags(1)) {
|
||||||
|
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
|
||||||
|
WriteByte(MSG_MULTICAST, EV_SHAKE);
|
||||||
|
WriteFloat(MSG_MULTICAST, m_flDuration);
|
||||||
|
WriteFloat(MSG_MULTICAST, m_flAmplitude);
|
||||||
|
WriteFloat(MSG_MULTICAST, m_flFrequency);
|
||||||
|
multicast([0,0,0], MULTICAST_ALL_R);
|
||||||
|
} else {
|
||||||
|
Client_ShakeOnce(origin, m_flRadius, m_flDuration, m_flFrequency, m_flAmplitude);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue