skins must always be loaded into a 320x200 buffer
sv_user.c:
	disable redirect for kill
This commit is contained in:
Bill Currie 2001-01-20 20:55:00 +00:00
parent 9146c88760
commit 591577f6ef
2 changed files with 14 additions and 4 deletions

View file

@ -126,6 +126,8 @@ Skin_Cache (skin_t *skin)
QFile *file; QFile *file;
tex_t *tex; tex_t *tex;
int pixels; int pixels;
byte *ipix, *opix;
int i;
if (cls.downloadtype == dl_skin) if (cls.downloadtype == dl_skin)
return NULL; // use base until downloaded return NULL; // use base until downloaded
@ -161,13 +163,19 @@ Skin_Cache (skin_t *skin)
Con_Printf ("Bad skin %s\n", name); Con_Printf ("Bad skin %s\n", name);
return NULL; return NULL;
} }
pixels = tex->width * tex->height; pixels = 320 * 200;
out = Cache_Alloc (&skin->cache, sizeof (tex_t) + pixels, skin->name); out = Cache_Alloc (&skin->cache, sizeof (tex_t) + pixels, skin->name);
if (!out) if (!out)
Sys_Error ("Skin_Cache: couldn't allocate"); Sys_Error ("Skin_Cache: couldn't allocate");
opix = out->data;
memcpy (out, tex, sizeof (tex_t) + pixels); out->width = 320;
out->height = 200;
out->palette = tex->palette;
memset (opix, 0, pixels);
for (i = 0, ipix = tex->data; i < tex->height;
i++, opix += 320, ipix += tex->width)
memcpy (opix, ipix, tex->width);
Skin_Process (skin, out); Skin_Process (skin, out);

View file

@ -931,8 +931,10 @@ void
SV_Kill_f (void) SV_Kill_f (void)
{ {
if (sv_player->v.health <= 0) { if (sv_player->v.health <= 0) {
SV_BeginRedirect (RD_CLIENT);
SV_ClientPrintf (host_client, PRINT_HIGH, SV_ClientPrintf (host_client, PRINT_HIGH,
"Can't suicide -- allready dead!\n"); "Can't suicide -- allready dead!\n");
SV_EndRedirect ();
return; return;
} }
@ -1206,7 +1208,7 @@ ucmd_t ucmds[] = {
// issued by hand at client consoles // issued by hand at client consoles
{"rate", SV_Rate_f}, {"rate", SV_Rate_f},
{"kill", SV_Kill_f}, {"kill", SV_Kill_f, 1},
{"pause", SV_Pause_f}, {"pause", SV_Pause_f},
{"msg", SV_Msg_f}, {"msg", SV_Msg_f},