------------------------------------------------------------------------

r4256 | acceptthis | 2013-03-12 21:07:07 +0000 (Tue, 12 Mar 2013) | 5 lines

Don't mess up/crash when the snap command is used (in multiple ways).
Misc NQ+csqc compat tweaks/hacks/fixes.
Added pointsound.
Don't rely upon fragmentation support with downloads. its a bad idea.
Fixed up the text editor to be able to debug properly again.
------------------------------------------------------------------------


git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4252 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-03-12 23:24:15 +00:00
parent dd68115e58
commit c1a80e5ba8
31 changed files with 383 additions and 180 deletions

View file

@ -1029,19 +1029,23 @@ void SV_StartSound (int ent, vec3_t origin, int seenmask, int channel, char *sam
SV_MulticastProtExt(origin, reliable ? MULTICAST_ALL_R : MULTICAST_ALL, seenmask, requiredextensions, 0);
}
void SVQ1_StartSound (wedict_t *wentity, int channel, char *sample, int volume, float attenuation, int pitchadj)
void SVQ1_StartSound (float *origin, wedict_t *wentity, int channel, char *sample, int volume, float attenuation, int pitchadj)
{
edict_t *entity = (edict_t*)wentity;
int i;
vec3_t origin;
if (entity->v->solid == SOLID_BSP)
vec3_t originbuf;
if (!origin)
{
for (i=0 ; i<3 ; i++)
origin[i] = entity->v->origin[i]+0.5*(entity->v->mins[i]+entity->v->maxs[i]);
}
else
{
VectorCopy (entity->v->origin, origin);
origin = originbuf;
if (entity->v->solid == SOLID_BSP)
{
for (i=0 ; i<3 ; i++)
origin[i] = entity->v->origin[i]+0.5*(entity->v->mins[i]+entity->v->maxs[i]);
}
else
{
VectorCopy (entity->v->origin, origin);
}
}
SV_StartSound(NUM_FOR_EDICT(svprogfuncs, entity), origin, entity->xv->dimension_seen, channel, sample, volume, attenuation, pitchadj);