mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
cl_ents.c:
bring back the location markers sv_ccmds.c: a few demo related fixes sv_demo.c: minor cleanups
This commit is contained in:
parent
826453a992
commit
16a90e17f2
3 changed files with 30 additions and 14 deletions
|
@ -40,6 +40,7 @@ static __attribute__ ((unused)) const char rcsid[] =
|
|||
|
||||
#include "QF/console.h"
|
||||
#include "QF/cvar.h"
|
||||
#include "QF/locs.h"
|
||||
#include "QF/msg.h"
|
||||
#include "QF/render.h"
|
||||
#include "QF/skin.h"
|
||||
|
@ -1143,6 +1144,27 @@ CL_EmitEntities (void)
|
|||
CL_LinkPacketEntities ();
|
||||
CL_LinkProjectiles ();
|
||||
CL_UpdateTEnts ();
|
||||
|
||||
if (!r_drawentities->int_val) {
|
||||
dlight_t *dl;
|
||||
location_t *nearloc;
|
||||
vec3_t trueloc;
|
||||
|
||||
nearloc = locs_find (r_origin);
|
||||
if (nearloc) {
|
||||
dl = R_AllocDlight (4096);
|
||||
if (dl) {
|
||||
VectorCopy (nearloc->loc, dl->origin);
|
||||
dl->radius = 200;
|
||||
dl->die = r_realtime + 0.1;
|
||||
dl->color[0] = 0;
|
||||
dl->color[1] = 1;
|
||||
dl->color[2] = 0;
|
||||
}
|
||||
VectorCopy (nearloc->loc, trueloc);
|
||||
R_WizSpikeEffect (trueloc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -757,15 +757,17 @@ SV_ConSay (const char *prefix, client_t *client)
|
|||
for (j = 0, client = svs.clients; j < MAX_CLIENTS; j++, client++) {
|
||||
if (client->state < cs_zombie)
|
||||
continue;
|
||||
SV_ClientPrintf (1, client, PRINT_HIGH, "%s\n", text->str);
|
||||
SV_ClientPrintf (0, client, PRINT_HIGH, "%s\n", text->str);
|
||||
if (*prefix != 'I') // beep, except for Info says
|
||||
SV_ClientPrintf (0, client, PRINT_CHAT, "%s", "");
|
||||
}
|
||||
if (sv.demorecording) {
|
||||
DemoWrite_Begin (dem_all, 0, strlen (text->str) + 3);
|
||||
MSG_WriteByte (&demo.dbuf->sz, svc_print);
|
||||
MSG_WriteByte (&demo.dbuf->sz, PRINT_CHAT);
|
||||
MSG_WriteByte (&demo.dbuf->sz, PRINT_HIGH);
|
||||
MSG_WriteString (&demo.dbuf->sz, text->str);
|
||||
MSG_WriteByte (&demo.dbuf->sz, PRINT_CHAT);
|
||||
MSG_WriteString (&demo.dbuf->sz, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,9 +97,6 @@ SV_WriteDemoMessage (sizebuf_t *msg, int type, int to, float time)
|
|||
byte c;
|
||||
static double prevtime;
|
||||
|
||||
if (!sv.demorecording)
|
||||
return;
|
||||
|
||||
msec = (time - prevtime) * 1000;
|
||||
prevtime += msec * 0.001;
|
||||
if (msec > 255)
|
||||
|
@ -256,9 +253,6 @@ SV_DemoWritePackets (int num)
|
|||
byte msg_buf[MAX_MSGLEN];
|
||||
demoinfo_t *demoinfo;
|
||||
|
||||
if (!sv.demorecording)
|
||||
return;
|
||||
|
||||
msg.data = msg_buf;
|
||||
msg.maxsize = sizeof (msg_buf);
|
||||
|
||||
|
@ -293,7 +287,7 @@ SV_DemoWritePackets (int num)
|
|||
break; // disconnected?
|
||||
if (nextcl->fixangle)
|
||||
break; // respawned, or walked into
|
||||
// teleport, do not interpolate!
|
||||
// teleport, do not interpolate!
|
||||
if (!(nextcl->flags & DF_DEAD) && (cl->flags & DF_DEAD))
|
||||
break; // respawned, do not interpolate
|
||||
|
||||
|
@ -382,10 +376,10 @@ SV_DemoWritePackets (int num)
|
|||
}
|
||||
|
||||
// this goes first to reduce demo size a bit
|
||||
SV_DemoWriteToDisk (demo.lasttype, demo.lastto, (float) time);
|
||||
SV_DemoWriteToDisk (0, 0, (float) time); // now goes the rest
|
||||
SV_DemoWriteToDisk (demo.lasttype, demo.lastto, time);
|
||||
SV_DemoWriteToDisk (0, 0, time); // now goes the rest
|
||||
if (msg.cursize)
|
||||
SV_WriteDemoMessage (&msg, dem_all, 0, (float) time);
|
||||
SV_WriteDemoMessage (&msg, dem_all, 0, time);
|
||||
}
|
||||
|
||||
if (demo.lastwritten > demo.parsecount)
|
||||
|
@ -704,8 +698,6 @@ SV_WriteSetDemoMessage (void)
|
|||
int len;
|
||||
byte c;
|
||||
|
||||
// Con_Printf ("write: %ld bytes, %4.4f\n", msg->cursize, realtime);
|
||||
|
||||
c = 0;
|
||||
demo.size += DWRITE (&c, sizeof (c), demo.dest);
|
||||
|
||||
|
|
Loading…
Reference in a new issue