Fix a few bugs.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4648 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
c0841c73ab
commit
952670bb3a
4 changed files with 10 additions and 3 deletions
|
@ -380,6 +380,8 @@ void P_DefaultTrail (model_t *model)
|
|||
// TODO: make trail default color into RGB values instead of indexes
|
||||
if (model->engineflags & MDLF_NODEFAULTTRAIL)
|
||||
return;
|
||||
if (!pe)
|
||||
return;
|
||||
|
||||
if (model->flags & MF_ROCKET)
|
||||
P_SelectableTrail(model, &r_rockettrail, P_FindParticleType("TR_ROCKET"), 109, P_FindParticleType("TR_GRENADE"), 6);
|
||||
|
|
|
@ -1895,7 +1895,7 @@ void QCBUILTIN PF_writetofile(pubprogfuncs_t *prinst, struct globalvars_s *pr_gl
|
|||
char *entstr;
|
||||
int buflen;
|
||||
|
||||
buflen = sizeof(buffer);
|
||||
buflen = 0;
|
||||
entstr = prinst->saveent(prinst, buffer, &buflen, sizeof(buffer), ed); //will save just one entities vars
|
||||
if (entstr)
|
||||
{
|
||||
|
@ -4219,10 +4219,11 @@ void QCBUILTIN PF_coredump (pubprogfuncs_t *prinst, struct globalvars_s *pr_glob
|
|||
}
|
||||
void QCBUILTIN PF_eprint (pubprogfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
int size = 1024*1024;
|
||||
int max = 1024*1024;
|
||||
int size = 0;
|
||||
char *buffer = BZ_Malloc(size);
|
||||
char *buf;
|
||||
buf = prinst->saveent(prinst, buffer, &size, size, (struct edict_s*)G_WEDICT(prinst, OFS_PARM0));
|
||||
buf = prinst->saveent(prinst, buffer, &size, max, (struct edict_s*)G_WEDICT(prinst, OFS_PARM0));
|
||||
Con_Printf("Entity %i:\n%s\n", G_EDICTNUM(prinst, OFS_PARM0), buf);
|
||||
BZ_Free(buffer);
|
||||
}
|
||||
|
|
|
@ -522,6 +522,8 @@ void GLR_NewMap (void)
|
|||
|
||||
Mod_ParseInfoFromEntityLump(cl.worldmodel, cl.worldmodel->entities, cl.worldmodel->name);
|
||||
|
||||
if (!pe)
|
||||
Cvar_ForceCallback(&r_particlesystem);
|
||||
TRACE(("dbg: GLR_NewMap: clear particles\n"));
|
||||
P_ClearParticles ();
|
||||
TRACE(("dbg: GLR_NewMap: wiping them stains (getting the cloth out)\n"));
|
||||
|
|
|
@ -2543,9 +2543,11 @@ void SV_Voice_Target_f(void)
|
|||
{
|
||||
other = atoi(t);
|
||||
if (other >= svs.allocated_client_slots)
|
||||
{
|
||||
if (verbose)
|
||||
SV_ClientTPrintf(host_client, PRINT_HIGH, "Invalid client\n");
|
||||
return;
|
||||
}
|
||||
host_client->voice_target = VT_PLAYERSLOT0 + other;
|
||||
if (verbose)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue