Merge branch 'master' into zscript

# Conflicts:
#	src/p_actionfunctions.cpp
#	wadsrc/static/actors/actor.txt
This commit is contained in:
Christoph Oelckers 2016-11-02 11:08:51 +01:00
commit f940216c17
26 changed files with 532 additions and 81 deletions

View file

@ -376,6 +376,7 @@ void ACSStringPool::Clear()
int ACSStringPool::AddString(const char *str)
{
if (str == nullptr) str = "";
size_t len = strlen(str);
unsigned int h = SuperFastHash(str, len);
unsigned int bucketnum = h % NUM_BUCKETS;
@ -792,6 +793,10 @@ void ACSStringPool::WriteStrings(FSerializer &file, const char *key) const
{
if (file.BeginObject(nullptr))
{
if (i == 430)
{
int a = 0;
}
file("index", i)
("string", entry->Str)
("lockcount", entry->LockCount)
@ -5346,7 +5351,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args)
case ACSF_PlaySound:
case ACSF_PlayActorSound:
// PlaySound(tid, "SoundName", channel, volume, looping, attenuation)
// PlaySound(tid, "SoundName", channel, volume, looping, attenuation, local)
{
FSoundID sid;
@ -5367,6 +5372,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args)
float vol = argCount > 3 ? ACSToFloat(args[3]) : 1.f;
INTBOOL looping = argCount > 4 ? args[4] : false;
float atten = argCount > 5 ? ACSToFloat(args[5]) : ATTN_NORM;
INTBOOL local = argCount > 6 ? args[6] : false;
if (args[0] == 0)
{
@ -5383,11 +5389,11 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
{
if (!looping)
{
S_Sound(spot, chan, sid, vol, atten);
S_PlaySound(spot, chan, sid, vol, atten, local);
}
else if (!S_IsActorPlayingSomething(spot, chan & 7, sid))
{
S_Sound(spot, chan | CHAN_LOOP, sid, vol, atten);
S_PlaySound(spot, chan | CHAN_LOOP, sid, vol, atten, local);
}
}
}