infodecal: fix client-side ones always rendering.
Add some more icons for various NSPointTrigger entities.
This commit is contained in:
parent
d31a3b65fd
commit
ee60a09eed
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/env_laser.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/env_message.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/env_spark.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/env_sprite.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/env_sun.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/infodecal.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/monstermaker.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/path_corner.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
diffusemap textures/editor/target_cdaudio.tga
|
||||||
|
|
||||||
|
{
|
||||||
|
map $diffuse
|
||||||
|
alphaFunc GE128
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
|
@ -22,12 +22,21 @@ public:
|
||||||
virtual void SpawnKey(string, string);
|
virtual void SpawnKey(string, string);
|
||||||
virtual float predraw(void);
|
virtual float predraw(void);
|
||||||
virtual bool CanSpawn(bool);
|
virtual bool CanSpawn(bool);
|
||||||
|
virtual void Respawn(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
decal m_decChild;
|
decal m_decChild;
|
||||||
string m_strTexture;
|
string m_strTexture;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void
|
||||||
|
infodecal::infodecal(void)
|
||||||
|
{
|
||||||
|
drawmask = MASK_ENGINE;
|
||||||
|
m_decChild = __NULL__;
|
||||||
|
m_strTexture = __NULL__;
|
||||||
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
infodecal::predraw(void)
|
infodecal::predraw(void)
|
||||||
{
|
{
|
||||||
|
@ -36,6 +45,7 @@ infodecal::predraw(void)
|
||||||
m_decChild.Place(origin, m_strTexture);
|
m_decChild.Place(origin, m_strTexture);
|
||||||
Destroy();
|
Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
return (PREDRAW_NEXT);
|
return (PREDRAW_NEXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,12 +72,10 @@ infodecal::SpawnKey(string strField, string strKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
infodecal::infodecal(void)
|
infodecal::Respawn(void)
|
||||||
{
|
{
|
||||||
|
/* if it has a targetname, it can't be made client-side only */
|
||||||
if (targetname) {
|
if (targetname) {
|
||||||
Destroy();
|
Destroy();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
drawmask = MASK_ENGINE;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,6 +115,8 @@ env_message::SpawnKey(string strKey, string strValue)
|
||||||
void
|
void
|
||||||
env_message::Respawn(void)
|
env_message::Respawn(void)
|
||||||
{
|
{
|
||||||
|
InitPointTrigger();
|
||||||
|
|
||||||
Trigger = Play;
|
Trigger = Play;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,8 @@ info_node_air::info_node_air(void)
|
||||||
void
|
void
|
||||||
info_node_air::Respawn(void)
|
info_node_air::Respawn(void)
|
||||||
{
|
{
|
||||||
|
InitPointTrigger();
|
||||||
|
|
||||||
SetSize([0,0,0], [0,0,0]);
|
SetSize([0,0,0], [0,0,0]);
|
||||||
SetSolid(SOLID_NOT);
|
SetSolid(SOLID_NOT);
|
||||||
SetMovetype(MOVETYPE_NONE);
|
SetMovetype(MOVETYPE_NONE);
|
||||||
|
|
|
@ -71,6 +71,7 @@ info_null::WarnDeveloper(void)
|
||||||
void
|
void
|
||||||
info_null::Respawn(void)
|
info_null::Respawn(void)
|
||||||
{
|
{
|
||||||
|
InitPointTrigger();
|
||||||
ScheduleThink(WarnDeveloper, 0.0f);
|
ScheduleThink(WarnDeveloper, 0.0f);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -42,11 +42,11 @@ infodecal:NSPointTrigger
|
||||||
public:
|
public:
|
||||||
void infodecal(void);
|
void infodecal(void);
|
||||||
|
|
||||||
|
virtual void SpawnKey(string,string);
|
||||||
|
virtual void Spawned(void);
|
||||||
|
virtual void Respawn(void);
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
|
||||||
virtual void Respawn(void);
|
|
||||||
virtual void Spawned(void);
|
|
||||||
virtual void Trigger(entity, triggermode_t);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -61,6 +61,55 @@ infodecal::infodecal(void)
|
||||||
m_strTexture = __NULL__;
|
m_strTexture = __NULL__;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
infodecal::SpawnKey(string strKey, string strValue)
|
||||||
|
{
|
||||||
|
switch (strKey) {
|
||||||
|
case "material":
|
||||||
|
m_strTexture = strValue;
|
||||||
|
break;
|
||||||
|
case "texture":
|
||||||
|
m_strTexture = strtolower(strValue);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
super::SpawnKey(strKey, strValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
infodecal::Spawned(void)
|
||||||
|
{
|
||||||
|
float bsp_version = serverkeyfloat("*bspversion");
|
||||||
|
|
||||||
|
super::Spawned();
|
||||||
|
|
||||||
|
switch (bsp_version) {
|
||||||
|
case BSPVER_HL:
|
||||||
|
case BSPVER_RBSP:
|
||||||
|
case BSPVER_Q3:
|
||||||
|
case BSPVER_RTCW:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
infodecal::Respawn(void)
|
||||||
|
{
|
||||||
|
InitPointTrigger();
|
||||||
|
|
||||||
|
if (HasTargetname() == false) {
|
||||||
|
/* we'll let the client-side handle this infodecal */
|
||||||
|
Destroy();
|
||||||
|
} else {
|
||||||
|
/* this will be invisible by default. needs to be triggered. */
|
||||||
|
Trigger(this, TRIG_OFF);
|
||||||
|
m_decChild = __NULL__;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
infodecal::Save(float handle)
|
infodecal::Save(float handle)
|
||||||
{
|
{
|
||||||
|
@ -84,57 +133,6 @@ infodecal::Restore(string strKey, string strValue)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
infodecal::SpawnKey(string strKey, string strValue)
|
|
||||||
{
|
|
||||||
switch (strKey) {
|
|
||||||
case "material":
|
|
||||||
m_strTexture = strValue;
|
|
||||||
break;
|
|
||||||
case "texture":
|
|
||||||
m_strTexture = strtolower(strValue);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
super::SpawnKey(strKey, strValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
infodecal::Spawned(void)
|
|
||||||
{
|
|
||||||
float bsp_version = serverkeyfloat("*bspversion");
|
|
||||||
|
|
||||||
switch (bsp_version) {
|
|
||||||
case BSPVER_HL:
|
|
||||||
case BSPVER_RBSP:
|
|
||||||
case BSPVER_Q3:
|
|
||||||
case BSPVER_RTCW:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
Destroy();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
infodecal::Respawn(void)
|
|
||||||
{
|
|
||||||
InitPointTrigger();
|
|
||||||
|
|
||||||
/* this will be invisible by default */
|
|
||||||
if (!targetname) {
|
|
||||||
#if 0
|
|
||||||
/* spawn automatically, remove self */
|
|
||||||
Trigger(this, TRIG_ON);
|
|
||||||
#else
|
|
||||||
Destroy();
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
Trigger(this, TRIG_OFF);
|
|
||||||
m_decChild = __NULL__;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
infodecal::Trigger(entity act, triggermode_t state)
|
infodecal::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
|
|
|
@ -198,6 +198,7 @@ logic_auto::Spawned(void)
|
||||||
void
|
void
|
||||||
logic_auto::Respawn(void)
|
logic_auto::Respawn(void)
|
||||||
{
|
{
|
||||||
|
InitPointTrigger();
|
||||||
ScheduleThink(Processing, 0.2f);
|
ScheduleThink(Processing, 0.2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,8 @@ point_camera::SpawnKey(string strKey, string strValue)
|
||||||
void
|
void
|
||||||
point_camera::Respawn(void)
|
point_camera::Respawn(void)
|
||||||
{
|
{
|
||||||
|
InitPointTrigger();
|
||||||
|
|
||||||
SetModelindex(0);
|
SetModelindex(0);
|
||||||
SetSolid(SOLID_NOT);
|
SetSolid(SOLID_NOT);
|
||||||
SetSize([-16,-16,-16], [16,16,16]);
|
SetSize([-16,-16,-16], [16,16,16]);
|
||||||
|
|
|
@ -177,6 +177,9 @@ void
|
||||||
point_trigger::Respawn(void)
|
point_trigger::Respawn(void)
|
||||||
{
|
{
|
||||||
vector vecMins, vecMaxs;
|
vector vecMins, vecMaxs;
|
||||||
|
|
||||||
|
InitPointTrigger();
|
||||||
|
|
||||||
SetMovetype(MOVETYPE_NONE);
|
SetMovetype(MOVETYPE_NONE);
|
||||||
SetSolid(SOLID_TRIGGER);
|
SetSolid(SOLID_TRIGGER);
|
||||||
SetOrigin(GetSpawnOrigin());
|
SetOrigin(GetSpawnOrigin());
|
||||||
|
|
|
@ -103,6 +103,8 @@ prop_door_rotating::SpawnKey(string strKey, string strValue)
|
||||||
void
|
void
|
||||||
prop_door_rotating::Respawn(void)
|
prop_door_rotating::Respawn(void)
|
||||||
{
|
{
|
||||||
|
InitPointTrigger();
|
||||||
|
|
||||||
SetModel(GetSpawnModel());
|
SetModel(GetSpawnModel());
|
||||||
SetSolid(SOLID_BSP);
|
SetSolid(SOLID_BSP);
|
||||||
SetMovetype(MOVETYPE_PUSH);
|
SetMovetype(MOVETYPE_PUSH);
|
||||||
|
|
|
@ -126,6 +126,7 @@ random_speaker::SpawnKey(string strKey, string strValue)
|
||||||
void
|
void
|
||||||
random_speaker::Respawn(void)
|
random_speaker::Respawn(void)
|
||||||
{
|
{
|
||||||
|
InitPointTrigger();
|
||||||
Disable();
|
Disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,6 +114,8 @@ random_trigger::SpawnKey(string strKey, string strValue)
|
||||||
void
|
void
|
||||||
random_trigger::Respawn(void)
|
random_trigger::Respawn(void)
|
||||||
{
|
{
|
||||||
|
InitPointTrigger();
|
||||||
|
|
||||||
if (m_iStartState == 1)
|
if (m_iStartState == 1)
|
||||||
Trigger(this, TRIG_ON);
|
Trigger(this, TRIG_ON);
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,6 +96,8 @@ target_cdaudio::SpawnKey(string strKey, string strValue)
|
||||||
void
|
void
|
||||||
target_cdaudio::Respawn(void)
|
target_cdaudio::Respawn(void)
|
||||||
{
|
{
|
||||||
|
InitPointTrigger();
|
||||||
|
|
||||||
geomtype = GEOMTYPE_SPHERE;
|
geomtype = GEOMTYPE_SPHERE;
|
||||||
mins = [-m_flRadius, -m_flRadius, -m_flRadius];
|
mins = [-m_flRadius, -m_flRadius, -m_flRadius];
|
||||||
maxs = [m_flRadius, m_flRadius, m_flRadius];
|
maxs = [m_flRadius, m_flRadius, m_flRadius];
|
||||||
|
|
|
@ -564,7 +564,7 @@ void NSEntity::SetNextThink( float fl ) {
|
||||||
if ( flTime >= 0 )
|
if ( flTime >= 0 )
|
||||||
nextthink = flTime;
|
nextthink = flTime;
|
||||||
else
|
else
|
||||||
EntError( "%s sets bogus nextthink value %f\n", classname, flTime );
|
EntError( "%s sets bogus nextthink value %f", classname, flTime );
|
||||||
}
|
}
|
||||||
|
|
||||||
void NSEntity::ScheduleThink( void ( void ) func, float fl ) {
|
void NSEntity::ScheduleThink( void ( void ) func, float fl ) {
|
||||||
|
|
Loading…
Reference in New Issue