mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-10 06:42:26 +00:00
The "Save Endy's Life" commit
Um, %d is not for floats, use %f
This commit is contained in:
parent
3a43cea3b7
commit
39dcc9fdf3
5 changed files with 19 additions and 13 deletions
|
@ -99,6 +99,8 @@ void ED_ParseGlobals (char *data);
|
|||
|
||||
void ED_LoadFromFile (char *data);
|
||||
|
||||
ddef_t *ED_FindField (char *name);
|
||||
|
||||
//define EDICT_NUM(n) ((edict_t *)(sv.edicts+ (n)*pr_edict_size))
|
||||
//define NUM_FOR_EDICT(e) (((byte *)(e) - sv.edicts)/pr_edict_size)
|
||||
|
||||
|
|
|
@ -64,9 +64,10 @@ common_SOURCES= net_chan.c net_com.c net_udp.c pmove.c pmovetst.c zone.c \
|
|||
mdfour.c mathlib.c cvar.c crc.c cmd.c \
|
||||
qargs.c qendian.c quakefs.c quakeio.c msg.c sizebuf.c info.c \
|
||||
checksum.c link.c buildnum.c va.c com.c $(MATH_ASM)
|
||||
server_SOURCES= pr_cmds.c pr_edict.c pr_exec.c sv_init.c sv_main.c sv_misc.c \
|
||||
sv_model.c sv_nchan.c sv_ents.c sv_send.c sv_move.c sv_phys.c \
|
||||
sv_user.c sv_ccmds.c world.c sv_cvar.c model.c $(WORLDA_ASM)
|
||||
server_SOURCES= pr_cmds.c pr_edict.c pr_exec.c pr_offs.c sv_init.c sv_main.c \
|
||||
sv_misc.c sv_model.c sv_nchan.c sv_ents.c sv_send.c sv_move.c \
|
||||
sv_phys.c sv_user.c sv_ccmds.c world.c sv_cvar.c model.c \
|
||||
$(WORLDA_ASM)
|
||||
client_SOURCES= cl_cmd.c cl_cvar.c cl_demo.c cl_ents.c cl_input.c cl_main.c \
|
||||
cl_misc.c cl_parse.c cl_pred.c cl_tent.c cl_cam.c \
|
||||
r_view.c wad.c \
|
||||
|
|
|
@ -260,7 +260,7 @@ void CL_ParseDelta (entity_state_t *from, entity_state_t *to, int bits)
|
|||
|
||||
if (bits & U_COLORMOD) {
|
||||
to->colormod = MSG_ReadByte();
|
||||
Con_Printf("CM: %d\n)", (float) to->colormod);
|
||||
Con_DPrintf("CM: %f\n)", (float) to->colormod);
|
||||
}
|
||||
|
||||
if (bits & U_SOLID)
|
||||
|
@ -528,7 +528,7 @@ void CL_LinkPacketEntities (void)
|
|||
ent->colormod[0] = (float) ((s1->colormod >> 5) & 7) * (1.0 / 7.0);
|
||||
ent->colormod[1] = (float) ((s1->colormod >> 2) & 7) * (1.0 / 7.0);
|
||||
ent->colormod[2] = (float) (s1->colormod & 3) * (1.0 / 3.0);
|
||||
Con_Printf("Colormod: %d %d %d\n", ent->colormod[0], ent->colormod[1], ent->colormod[2]);
|
||||
Con_DPrintf("Colormod: %f %f %f\n", ent->colormod[0], ent->colormod[1], ent->colormod[2]);
|
||||
} else {
|
||||
ent->colormod[0] = ent->colormod[1] = ent->colormod[2] = 0;
|
||||
}
|
||||
|
|
|
@ -57,6 +57,9 @@
|
|||
#include "console.h"
|
||||
#include "glquake.h"
|
||||
|
||||
// FIXME: Do this right..
|
||||
void LoadTGA (FILE *fin);
|
||||
|
||||
extern byte *host_basepal;
|
||||
extern unsigned char d_15to8table[65536];
|
||||
extern cvar_t *crosshair, *cl_crossx, *cl_crossy, *crosshaircolor;
|
||||
|
@ -96,6 +99,7 @@ static byte cs_data[64] = {
|
|||
typedef struct
|
||||
{
|
||||
int texnum;
|
||||
int bytesperpixel;
|
||||
float sl, tl, sh, th;
|
||||
} glpic_t;
|
||||
|
||||
|
|
|
@ -566,25 +566,23 @@ void SV_WriteEntitiesToClient (client_t *client, sizebuf_t *msg)
|
|||
|
||||
// Ender: EXTEND (QSG - Begin)
|
||||
{
|
||||
int tmp;
|
||||
eval_t *val;
|
||||
state->glowsize = 0;
|
||||
state->glowcolor = 254;
|
||||
state->colormod = 0;
|
||||
|
||||
if (val = GETEDICTFIELDVALUE(ent, eval_glowsize)) {
|
||||
state->glowsize = (int) val->_float >> 3;
|
||||
if (state->glowsize > 127)
|
||||
state->glowsize = 127;
|
||||
if (state->glowsize < -128)
|
||||
state->glowsize = -128;
|
||||
if ((val = GETEDICTFIELDVALUE(ent, eval_glowsize))) {
|
||||
tmp = (int)val->_float >> 3;
|
||||
state->glowsize = bound(-128, tmp, 127);
|
||||
}
|
||||
|
||||
if (val = GETEDICTFIELDVALUE(ent, eval_glowcolor)) {
|
||||
if ((val = GETEDICTFIELDVALUE(ent, eval_glowcolor))) {
|
||||
if (val->_float != 0)
|
||||
state->glowcolor = (int) val->_float;
|
||||
}
|
||||
|
||||
if (val = GETEDICTFIELDVALUE(ent, eval_colormod)) {
|
||||
if ((val = GETEDICTFIELDVALUE(ent, eval_colormod))) {
|
||||
if (val->vector[0] != 0 || val->vector[1] != 0 || val->vector[2] != 0) {
|
||||
int modred, modgreen, modblue;
|
||||
Con_Printf("Setting colormod! :)\n");
|
||||
|
@ -616,3 +614,4 @@ void SV_WriteEntitiesToClient (client_t *client, sizebuf_t *msg)
|
|||
// now add the specialized nail update
|
||||
SV_EmitNailUpdate (msg);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue