Experienced Elementalist
- Joined
- May 4, 2013
- Messages
- 269
- Reaction score
- 129
if(loadout.GameMapId && (loadout.GameMapId == ginfo_.mapId) && loadout.Alive == 1)
{
*pos = loadout.GamePos;
*dir = loadout.GameDir;
//r3dOutToLog("alive at position %f %f %f\n", pos->x, pos->y, pos->z);
return;
}
/*if(loadout.GameMapId && (loadout.GameMapId == ginfo_.mapId) && loadout.Alive == 1)
{
*pos = loadout.GamePos;
*dir = loadout.GameDir;
//r3dOutToLog("alive at position %f %f %f\n", pos->x, pos->y, pos->z);
return;
}*/
if(loadout.GameMapId && loadout.Alive == 2)
{
GetSpawnPositionAfterDeath(loadout.GamePos, pos, dir);
// move spawn pos at radius
pos->x += u_GetRandom(-_glm_SpawnRadius, _glm_SpawnRadius);
pos->z += u_GetRandom(-_glm_SpawnRadius, _glm_SpawnRadius);
//r3dOutToLog("revived at position %f %f %f\n", pos->x, pos->y, pos->z);
return;
}
if(loadout.GameMapId && loadout.Alive == 1 || loadout.Alive == 2)
{
GetSpawnPositionAfterDeath(loadout.GamePos, pos, dir);
// move spawn pos at radius
pos->x += u_GetRandom(-_glm_SpawnRadius, _glm_SpawnRadius);
pos->z += u_GetRandom(-_glm_SpawnRadius, _glm_SpawnRadius);
//r3dOutToLog("revived at position %f %f %f\n", pos->x, pos->y, pos->z);
return;
}
AllRight source ????
AllRight source ????
Thanks for sharing, I'm pretty sure we will be seeing emulators using this teleport thing
nice easy tutorial works well on my new emulator stops the noobs keep logging out when they are being hunted then logging back in and having spawn protection right in the center of clearview whats a right pain
How can i stop the teleport when I logout in a safezone ?
bool isinSafe = false;
for(int i=0; i<gPostBoxesMngr.numPostBoxes_; i++)
{
obj_ServerPostBox* pbox = gPostBoxesMngr.postBoxes_[i];
float dist = (loadout.GamePos - pbox->GetPosition()).Length();
if(dist < pbox->useRadius)
{
isinSafe = true;
}
}
else if(loadout.GameMapId && loadout.Alive == 2 || loadout.Alive == 1 && !isinSafe)
{
GetSpawnPositionAfterDeath(loadout.GamePos, pos , dir);
// move spawn pos at radius
//pos->x += u_GetRandom(10, 120);
//pos->z += u_GetRandom(10, 120);
protect = 1;
r3dOutToLog("revived at position %f %f %f\n", pos->x, pos->y, pos->z);
return;
}