These functions will make a fine addition to my collection ACSUtils.
function bool SetActorPositionForced(int tid, int x, int y, int z, bool fog)
{
bool result = Warp(tid, x, y, z, 0, WARPF_MOVEPTR|WARPF_ABSOLUTEPOSITION|WARPF_NOCHECKPOSITION);
if (fog)
SpawnForced("TeleportFog", x, y, z);
return result;
}
function int hash_djb2(str key)
{
int hash = 5381;
for (int i = 0; i < strlen(key); i++)
hash = ((hash << 5) + hash) + GetChar(key, i);
return hash;
}
function int hash_sdbm(str key)
{
int hash = 0;
for (int i = 0; i < strlen(key); i++)
hash = GetChar(key, i) + (hash << 6) + (hash << 16) - hash;
return hash;
}