- Sync scripting branch with what was in trunk on Sunday. I believe that would be revision 2739.

SVN r2790 (scripting)
This commit is contained in:
Randy Heit 2010-09-16 03:14:32 +00:00
commit 99670b708c
317 changed files with 17299 additions and 7273 deletions

View file

@ -49,6 +49,7 @@
#include "templates.h"
#include "timidity/timidity.h"
#include "g_level.h"
#include "po_man.h"
// MACROS ------------------------------------------------------------------
@ -323,6 +324,7 @@ void S_InitData ()
LastLocalSndInfo = LastLocalSndSeq = "";
S_ParseSndInfo ();
S_ParseSndSeq (-1);
S_ParseMusInfo();
}
//==========================================================================
@ -794,11 +796,11 @@ static void CalcSectorSoundOrg(const sector_t *sec, int channum, fixed_t *x, fix
static void CalcPolyobjSoundOrg(const FPolyObj *poly, fixed_t *x, fixed_t *y, fixed_t *z)
{
seg_t *seg;
side_t *side;
sector_t *sec;
PO_ClosestPoint(poly, *x, *y, *x, *y, &seg);
sec = seg->frontsector;
poly->ClosestPoint(*x, *y, *x, *y, &side);
sec = side->sector;
*z = clamp(*z, sec->floorplane.ZatPoint(*x, *y), sec->ceilingplane.ZatPoint(*x, *y));
}
@ -825,7 +827,7 @@ static FSoundChan *S_StartSound(AActor *actor, const sector_t *sec, const FPolyO
FVector3 pos, vel;
FRolloffInfo *rolloff;
if (sound_id <= 0 || volume <= 0)
if (sound_id <= 0 || volume <= 0 || nosfx)
return NULL;
int type;
@ -2327,7 +2329,8 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force)
// Don't choke if the map doesn't have a song attached
S_StopMusic (true);
mus_playing.name = "";
return false;
LastSong = "";
return true;
}
FString DEH_Music;