infodecal: fix client-side ones always rendering.
Add some more icons for various NSPointTrigger entities.
This commit is contained in:
parent
d31a3b65fd
commit
ee60a09eed
35 changed files with 155 additions and 59 deletions
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/env_laser.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
BIN
platform/base_textures.pk3dir/textures/editor/env_laser.tga
Normal file
BIN
platform/base_textures.pk3dir/textures/editor/env_laser.tga
Normal file
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/env_message.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
BIN
platform/base_textures.pk3dir/textures/editor/env_message.tga
Normal file
BIN
platform/base_textures.pk3dir/textures/editor/env_message.tga
Normal file
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/env_spark.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
BIN
platform/base_textures.pk3dir/textures/editor/env_spark.tga
Normal file
BIN
platform/base_textures.pk3dir/textures/editor/env_spark.tga
Normal file
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/env_sprite.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
BIN
platform/base_textures.pk3dir/textures/editor/env_sprite.tga
Normal file
BIN
platform/base_textures.pk3dir/textures/editor/env_sprite.tga
Normal file
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/env_sun.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
BIN
platform/base_textures.pk3dir/textures/editor/env_sun.tga
Normal file
BIN
platform/base_textures.pk3dir/textures/editor/env_sun.tga
Normal file
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/infodecal.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
BIN
platform/base_textures.pk3dir/textures/editor/infodecal.tga
Normal file
BIN
platform/base_textures.pk3dir/textures/editor/infodecal.tga
Normal file
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/monstermaker.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
BIN
platform/base_textures.pk3dir/textures/editor/monstermaker.tga
Normal file
BIN
platform/base_textures.pk3dir/textures/editor/monstermaker.tga
Normal file
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
|
||||
}
|
||||
}
|
BIN
platform/base_textures.pk3dir/textures/editor/path_corner.tga
Normal file
BIN
platform/base_textures.pk3dir/textures/editor/path_corner.tga
Normal file
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/target_cdaudio.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
BIN
platform/base_textures.pk3dir/textures/editor/target_cdaudio.tga
Normal file
BIN
platform/base_textures.pk3dir/textures/editor/target_cdaudio.tga
Normal file
Binary file not shown.
Binary file not shown.
|
@ -22,12 +22,21 @@ public:
|
|||
virtual void SpawnKey(string, string);
|
||||
virtual float predraw(void);
|
||||
virtual bool CanSpawn(bool);
|
||||
virtual void Respawn(void);
|
||||
|
||||
private:
|
||||
decal m_decChild;
|
||||
string m_strTexture;
|
||||
};
|
||||
|
||||
void
|
||||
infodecal::infodecal(void)
|
||||
{
|
||||
drawmask = MASK_ENGINE;
|
||||
m_decChild = __NULL__;
|
||||
m_strTexture = __NULL__;
|
||||
}
|
||||
|
||||
float
|
||||
infodecal::predraw(void)
|
||||
{
|
||||
|
@ -36,6 +45,7 @@ infodecal::predraw(void)
|
|||
m_decChild.Place(origin, m_strTexture);
|
||||
Destroy();
|
||||
}
|
||||
|
||||
return (PREDRAW_NEXT);
|
||||
}
|
||||
|
||||
|
@ -62,12 +72,10 @@ infodecal::SpawnKey(string strField, string strKey)
|
|||
}
|
||||
|
||||
void
|
||||
infodecal::infodecal(void)
|
||||
infodecal::Respawn(void)
|
||||
{
|
||||
/* if it has a targetname, it can't be made client-side only */
|
||||
if (targetname) {
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
drawmask = MASK_ENGINE;
|
||||
}
|
||||
|
|
|
@ -115,6 +115,8 @@ env_message::SpawnKey(string strKey, string strValue)
|
|||
void
|
||||
env_message::Respawn(void)
|
||||
{
|
||||
InitPointTrigger();
|
||||
|
||||
Trigger = Play;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@ info_node_air::info_node_air(void)
|
|||
void
|
||||
info_node_air::Respawn(void)
|
||||
{
|
||||
InitPointTrigger();
|
||||
|
||||
SetSize([0,0,0], [0,0,0]);
|
||||
SetSolid(SOLID_NOT);
|
||||
SetMovetype(MOVETYPE_NONE);
|
||||
|
|
|
@ -71,6 +71,7 @@ info_null::WarnDeveloper(void)
|
|||
void
|
||||
info_null::Respawn(void)
|
||||
{
|
||||
InitPointTrigger();
|
||||
ScheduleThink(WarnDeveloper, 0.0f);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -42,11 +42,11 @@ infodecal:NSPointTrigger
|
|||
public:
|
||||
void infodecal(void);
|
||||
|
||||
virtual void SpawnKey(string,string);
|
||||
virtual void Spawned(void);
|
||||
virtual void Respawn(void);
|
||||
virtual void Save(float);
|
||||
virtual void Restore(string,string);
|
||||
virtual void SpawnKey(string,string);
|
||||
virtual void Respawn(void);
|
||||
virtual void Spawned(void);
|
||||
virtual void Trigger(entity, triggermode_t);
|
||||
|
||||
private:
|
||||
|
@ -61,6 +61,55 @@ infodecal::infodecal(void)
|
|||
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
|
||||
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
|
||||
infodecal::Trigger(entity act, triggermode_t state)
|
||||
{
|
||||
|
|
|
@ -198,6 +198,7 @@ logic_auto::Spawned(void)
|
|||
void
|
||||
logic_auto::Respawn(void)
|
||||
{
|
||||
InitPointTrigger();
|
||||
ScheduleThink(Processing, 0.2f);
|
||||
}
|
||||
|
||||
|
|
|
@ -142,6 +142,8 @@ point_camera::SpawnKey(string strKey, string strValue)
|
|||
void
|
||||
point_camera::Respawn(void)
|
||||
{
|
||||
InitPointTrigger();
|
||||
|
||||
SetModelindex(0);
|
||||
SetSolid(SOLID_NOT);
|
||||
SetSize([-16,-16,-16], [16,16,16]);
|
||||
|
|
|
@ -177,6 +177,9 @@ void
|
|||
point_trigger::Respawn(void)
|
||||
{
|
||||
vector vecMins, vecMaxs;
|
||||
|
||||
InitPointTrigger();
|
||||
|
||||
SetMovetype(MOVETYPE_NONE);
|
||||
SetSolid(SOLID_TRIGGER);
|
||||
SetOrigin(GetSpawnOrigin());
|
||||
|
|
|
@ -103,6 +103,8 @@ prop_door_rotating::SpawnKey(string strKey, string strValue)
|
|||
void
|
||||
prop_door_rotating::Respawn(void)
|
||||
{
|
||||
InitPointTrigger();
|
||||
|
||||
SetModel(GetSpawnModel());
|
||||
SetSolid(SOLID_BSP);
|
||||
SetMovetype(MOVETYPE_PUSH);
|
||||
|
|
|
@ -126,6 +126,7 @@ random_speaker::SpawnKey(string strKey, string strValue)
|
|||
void
|
||||
random_speaker::Respawn(void)
|
||||
{
|
||||
InitPointTrigger();
|
||||
Disable();
|
||||
}
|
||||
|
||||
|
|
|
@ -114,6 +114,8 @@ random_trigger::SpawnKey(string strKey, string strValue)
|
|||
void
|
||||
random_trigger::Respawn(void)
|
||||
{
|
||||
InitPointTrigger();
|
||||
|
||||
if (m_iStartState == 1)
|
||||
Trigger(this, TRIG_ON);
|
||||
}
|
||||
|
|
|
@ -96,6 +96,8 @@ target_cdaudio::SpawnKey(string strKey, string strValue)
|
|||
void
|
||||
target_cdaudio::Respawn(void)
|
||||
{
|
||||
InitPointTrigger();
|
||||
|
||||
geomtype = GEOMTYPE_SPHERE;
|
||||
mins = [-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 )
|
||||
nextthink = flTime;
|
||||
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 ) {
|
||||
|
|
Loading…
Reference in a new issue