jpeg.o keys.o menu.o meshqueue.o r_crosshairs.o r_explosion.o \
r_lerpanim.o r_light.o r_lightning.o r_modules.o r_sky.o \
r_sprites.o sbar.o ui.o vid_shared.o view.o wavefile.o \
- r_shadow.o prvm_exec.o prvm_edict.o prvm_cms.o
+ r_shadow.o prvm_exec.o prvm_edict.o prvm_cmds.o
SERVEROBJECTS= pr_cmds.o pr_edict.o pr_exec.o sv_main.o sv_move.o \
sv_phys.o sv_user.o
SHAREDOBJECTS= cmd.o collision.o common.o crc.o cvar.o \
char *s;
ddef_t *def;
mfunction_t *f;
-
+
type &= ~DEF_SAVEGLOBAL;
-
+
switch (type)
{
case ev_string:
// Parse the string a bit to turn special characters
// (like newline, specifically) into escape codes,
// this fixes saving games from various mods
- sprintf (line, "%s", PRVM_GetString(val->string));
+ s = PRVM_GetString (val->string);
for (i = 0;i < (int)sizeof(line) - 2 && *s;)
{
if (*s == '\n')
s++;
}
line[i] = '\0';
-
break;
case ev_entity:
- sprintf (line, "%i", PRVM_NUM_FOR_EDICT(PRVM_PROG_TO_EDICT(val->edict)));
+ snprintf (line, sizeof (line), "%i", PRVM_NUM_FOR_EDICT(PRVM_PROG_TO_EDICT(val->edict)));
break;
case ev_function:
f = pr_functions + val->function;
- sprintf (line, "%s", PRVM_GetString(f->s_name));
+ snprintf (line, sizeof (line), "%s", PRVM_GetString(f->s_name));
break;
case ev_field:
def = PRVM_ED_FieldAtOfs ( val->_int );
- s = PRVM_GetString(def->s_name);
+ snprintf (line, sizeof (line), ".%s", PRVM_GetString(def->s_name));
break;
case ev_void:
- sprintf (line, "void");
+ snprintf (line, sizeof (line), "void");
break;
case ev_float:
- sprintf (line, "%f", val->_float);
+ snprintf (line, sizeof (line), "%f", val->_float);
break;
case ev_vector:
- sprintf (line, "%f %f %f", val->vector[0], val->vector[1], val->vector[2]);
+ snprintf (line, sizeof (line), "%f %f %f", val->vector[0], val->vector[1], val->vector[2]);
break;
default:
- sprintf (line, "bad type %i", type);
+ snprintf (line, sizeof (line), "bad type %i", type);
break;
}
-
+
return line;
}
prog->edictstring_mempool = t2;
prog->edicts_mempool = t3;
- PRVM_GCALL(reset_cmd);
+ PRVM_GCALL(reset_cmd)();
}
/*