Merge branch 'master' into scripting

Conflicts:
	src/g_shared/a_randomspawner.cpp
	src/g_strife/a_strifeweapons.cpp
	src/thingdef/thingdef_parse.cpp
	wadsrc/static/actors/constants.txt
This commit is contained in:
Christoph Oelckers 2013-09-03 09:01:28 +02:00
commit 251cdacf26
30 changed files with 168 additions and 57 deletions

View file

@ -575,11 +575,7 @@ int ACSStringPool::InsertString(FString &str, unsigned int h, unsigned int bucke
}
else
{ // Scan for the next free entry
unsigned int i;
for (i = FirstFreeEntry + 1; i < Pool.Size() && Pool[i].Next != FREE_ENTRY; ++i)
{
}
FirstFreeEntry = i;
FindFirstFreeEntry(FirstFreeEntry + 1);
}
PoolEntry *entry = &Pool[index];
entry->Str = str;
@ -590,6 +586,23 @@ int ACSStringPool::InsertString(FString &str, unsigned int h, unsigned int bucke
return index | STRPOOL_LIBRARYID_OR;
}
//============================================================================
//
// ACSStringPool :: FindFirstFreeEntry
//
// Finds the first free entry, starting at base.
//
//============================================================================
void ACSStringPool::FindFirstFreeEntry(unsigned base)
{
while (base < Pool.Size() && Pool[base].Next != FREE_ENTRY)
{
base++;
}
FirstFreeEntry = base;
}
//============================================================================
//
// ACSStringPool :: ReadStrings
@ -638,6 +651,7 @@ void ACSStringPool::ReadStrings(PNGHandle *png, DWORD id)
{
delete[] str;
}
FindFirstFreeEntry(0);
}
}
@ -690,6 +704,7 @@ void ACSStringPool::Dump() const
Printf("%4u. (%2d) \"%s\"\n", i, Pool[i].LockCount, Pool[i].Str.GetChars());
}
}
Printf("First free %u\n", FirstFreeEntry);
}
//============================================================================
@ -8397,7 +8412,7 @@ scriptwait:
{
int playernum = STACK(1);
if (playernum < 0 || playernum >= MAXPLAYERS || !playeringame[playernum] || players[playernum].camera == NULL)
if (playernum < 0 || playernum >= MAXPLAYERS || !playeringame[playernum] || players[playernum].camera == NULL || players[playernum].camera->player != NULL)
{
STACK(1) = -1;
}