Server: show 'entered game' message once and only in MP.
This commit is contained in:
parent
f0034cb03a
commit
32a36d8017
16 changed files with 96 additions and 35 deletions
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/info_node.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
blendFunc blend
|
||||
}
|
||||
}
|
BIN
platform/base_textures.pk3dir/textures/editor/info_node.tga
Normal file
BIN
platform/base_textures.pk3dir/textures/editor/info_node.tga
Normal file
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/info_node_air.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
blendFunc blend
|
||||
}
|
||||
}
|
BIN
platform/base_textures.pk3dir/textures/editor/info_node_air.tga
Normal file
BIN
platform/base_textures.pk3dir/textures/editor/info_node_air.tga
Normal file
Binary file not shown.
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
diffusemap textures/editor/light_dynamic.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
blendFunc blend
|
||||
rgbGen vertex
|
||||
}
|
||||
}
|
BIN
platform/base_textures.pk3dir/textures/editor/light_dynamic.tga
Normal file
BIN
platform/base_textures.pk3dir/textures/editor/light_dynamic.tga
Normal file
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/model_bone.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
blendFunc blend
|
||||
}
|
||||
}
|
BIN
platform/base_textures.pk3dir/textures/editor/model_bone.tga
Normal file
BIN
platform/base_textures.pk3dir/textures/editor/model_bone.tga
Normal file
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/path_track.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
blendFunc blend
|
||||
}
|
||||
}
|
BIN
platform/base_textures.pk3dir/textures/editor/path_track.tga
Normal file
BIN
platform/base_textures.pk3dir/textures/editor/path_track.tga
Normal file
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/scripted_sequence.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
blendFunc blend
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -61,6 +61,7 @@ public:
|
|||
nonvirtual void PathEndTrigger(entity, triggermode_t);
|
||||
|
||||
/* overrides */
|
||||
virtual void DebugDraw(void);
|
||||
virtual void Respawn(void);
|
||||
virtual void SpawnKey(string, string);
|
||||
virtual void Save(float);
|
||||
|
@ -89,6 +90,25 @@ path_track::path_track(void)
|
|||
m_strEndTrigger = __NULL__;
|
||||
}
|
||||
|
||||
void
|
||||
path_track::DebugDraw(void)
|
||||
{
|
||||
vector pos = GetOrigin();
|
||||
pos[2] += 32;
|
||||
R_BeginPolygon("textures/editor/path_track", 0, 0);
|
||||
R_PolygonVertex(pos + v_right * 24 - v_up * 24, [1,1], [1,1,1], 1.0f);
|
||||
R_PolygonVertex(pos - v_right * 24 - v_up * 24, [0,1], [1,1,1], 1.0f);
|
||||
R_PolygonVertex(pos - v_right * 24 + v_up * 24, [0,0], [1,1,1], 1.0f);
|
||||
R_PolygonVertex(pos + v_right * 24 + v_up * 24, [1,0], [1,1,1], 1.0f);
|
||||
R_EndPolygon();
|
||||
|
||||
R_BeginPolygon("", 0, 0);
|
||||
R_PolygonVertex(GetOrigin(), [0,1], [1,1,1], 0.5f);
|
||||
R_PolygonVertex(pos, [1,1], [1,1,1], 0.5f);
|
||||
R_EndPolygon();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
path_track::SpawnKey(string keyName, string setValue)
|
||||
{
|
||||
|
|
|
@ -104,6 +104,7 @@ public:
|
|||
virtual void Respawn(void);
|
||||
virtual void SpawnKey(string,string);
|
||||
virtual void Touch(entity);
|
||||
virtual void DebugDraw(void);
|
||||
|
||||
nonvirtual void RunOnEntity(entity);
|
||||
nonvirtual void InitIdle(void);
|
||||
|
@ -128,6 +129,25 @@ scripted_sequence::scripted_sequence(void)
|
|||
m_iMove = 0i;
|
||||
}
|
||||
|
||||
void
|
||||
scripted_sequence::DebugDraw(void)
|
||||
{
|
||||
vector pos = GetOrigin();
|
||||
pos[2] += 32;
|
||||
|
||||
R_BeginPolygon("textures/editor/scripted_sequence", 0, 0);
|
||||
R_PolygonVertex(pos + v_right * 24 - v_up * 24, [1,1], [1,1,1], 1.0f);
|
||||
R_PolygonVertex(pos - v_right * 24 - v_up * 24, [0,1], [1,1,1], 1.0f);
|
||||
R_PolygonVertex(pos - v_right * 24 + v_up * 24, [0,0], [1,1,1], 1.0f);
|
||||
R_PolygonVertex(pos + v_right * 24 + v_up * 24, [1,0], [1,1,1], 1.0f);
|
||||
R_EndPolygon();
|
||||
|
||||
R_BeginPolygon("", 0, 0);
|
||||
R_PolygonVertex(GetOrigin(), [0,1], [1,1,1], 0.5);
|
||||
R_PolygonVertex(pos, [1,1], [1,1,1], 0.5);
|
||||
R_EndPolygon();
|
||||
}
|
||||
|
||||
void
|
||||
scripted_sequence::Save(float handle)
|
||||
{
|
||||
|
|
|
@ -92,7 +92,9 @@ ClientDisconnect(void)
|
|||
pl.Disappear();
|
||||
pl.classname = "";
|
||||
pl.flags = 0;
|
||||
|
||||
pl.deaths = 0;
|
||||
pl.frags = 0;
|
||||
pl.score = 0;
|
||||
}
|
||||
|
||||
/** Called by the `kill` console command.
|
||||
|
@ -161,7 +163,10 @@ PutClientInServer(void)
|
|||
}
|
||||
|
||||
Plugin_PlayerEntered((NSClientPlayer)self);
|
||||
bprint(PRINT_HIGH, sprintf("%s^d entered the game.\n", self.netname));
|
||||
|
||||
if (g_grMode.IsMultiplayer() == true && self.deaths <= 0) {
|
||||
bprint(PRINT_HIGH, sprintf("%s^d entered the game.\n", self.netname));
|
||||
}
|
||||
|
||||
/* activate all game_playerspawn entities */
|
||||
for (entity a = world; (a = find(a, ::targetname, "game_playerspawn"));) {
|
||||
|
|
|
@ -286,38 +286,5 @@ SV_AddDebugPolygons(void)
|
|||
R_PolygonVertex(w->origin + v_right * 8 + v_up * 8, [1,0], NODE_RECT_COLOR, NODE_RECT_ALPHA);
|
||||
R_EndPolygon();
|
||||
}
|
||||
|
||||
for (entity s = world; (s = find(s, ::classname, "path_track"));) {
|
||||
vector pos = s.origin;
|
||||
pos[2] += 32;
|
||||
R_BeginPolygon("textures/dev/path_track", 0, 0);
|
||||
R_PolygonVertex(pos + v_right * 24 - v_up * 24, [1,1], [1,1,1], 1.0f);
|
||||
R_PolygonVertex(pos - v_right * 24 - v_up * 24, [0,1], [1,1,1], 1.0f);
|
||||
R_PolygonVertex(pos - v_right * 24 + v_up * 24, [0,0], [1,1,1], 1.0f);
|
||||
R_PolygonVertex(pos + v_right * 24 + v_up * 24, [1,0], [1,1,1], 1.0f);
|
||||
R_EndPolygon();
|
||||
|
||||
R_BeginPolygon("", 0, 0);
|
||||
R_PolygonVertex(s.origin, [0,1], [1,1,1], NODE_LINE_ALPHA);
|
||||
R_PolygonVertex(pos, [1,1], [1,1,1], NODE_LINE_ALPHA);
|
||||
R_EndPolygon();
|
||||
}
|
||||
|
||||
for (entity s = world; (s = find(s, ::classname, "scripted_sequence"));) {
|
||||
vector pos = s.origin;
|
||||
pos[2] += 32;
|
||||
|
||||
R_BeginPolygon("textures/dev/scripted_sequence", 0, 0);
|
||||
R_PolygonVertex(pos + v_right * 24 - v_up * 24, [1,1], SEQUENCE_RECT_COLOR, NODE_RECT_ALPHA);
|
||||
R_PolygonVertex(pos - v_right * 24 - v_up * 24, [0,1], SEQUENCE_RECT_COLOR, NODE_RECT_ALPHA);
|
||||
R_PolygonVertex(pos - v_right * 24 + v_up * 24, [0,0], SEQUENCE_RECT_COLOR, NODE_RECT_ALPHA);
|
||||
R_PolygonVertex(pos + v_right * 24 + v_up * 24, [1,0], SEQUENCE_RECT_COLOR, NODE_RECT_ALPHA);
|
||||
R_EndPolygon();
|
||||
|
||||
R_BeginPolygon("", 0, 0);
|
||||
R_PolygonVertex(s.origin, [0,1], [1,1,1], NODE_LINE_ALPHA);
|
||||
R_PolygonVertex(pos, [1,1], [1,1,1], NODE_LINE_ALPHA);
|
||||
R_EndPolygon();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue