fix: Accessed None 'BestN' (Ext_T_GhostHelper:CanResPlayer)
ScriptWarning: Accessed None 'BestN' 011Ext_T_GhostHelper KF-KillingPool.TheWorld:PersistentLevel.Ext_T_GhostHelper_2 011Function ServerExt.Ext_T_GhostHelper:CanResPlayer:014C
This commit is contained in:
parent
431a429926
commit
fd12729528
@ -8,6 +8,8 @@ var bool bTeleporting,bIsDelayed;
|
|||||||
|
|
||||||
function bool CanResPlayer(KFPawn_Human Other, byte Level)
|
function bool CanResPlayer(KFPawn_Human Other, byte Level)
|
||||||
{
|
{
|
||||||
|
local Actor SpawnPoint;
|
||||||
|
|
||||||
if (bTeleporting)
|
if (bTeleporting)
|
||||||
{
|
{
|
||||||
if (LastDied!=None)
|
if (LastDied!=None)
|
||||||
@ -23,11 +25,17 @@ function bool CanResPlayer(KFPawn_Human Other, byte Level)
|
|||||||
else if (Level==1 && Rand(2)==0)
|
else if (Level==1 && Rand(2)==0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
LastDied = Other;
|
|
||||||
bTeleporting = true;
|
|
||||||
if (SpawnPointer==None)
|
if (SpawnPointer==None)
|
||||||
SpawnPointer = class'ExtSpawnPointHelper'.Static.FindHelper(WorldInfo);
|
SpawnPointer = class'ExtSpawnPointHelper'.Static.FindHelper(WorldInfo);
|
||||||
ResPoint = SpawnPointer.PickBestSpawn().Location;
|
|
||||||
|
SpawnPoint = SpawnPointer.PickBestSpawn();
|
||||||
|
if (SpawnPoint == None)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
LastDied = Other;
|
||||||
|
bTeleporting = true;
|
||||||
|
|
||||||
|
ResPoint = SpawnPoint.Location;
|
||||||
LastDied.FindSpot(vect(36,36,86),ResPoint);
|
LastDied.FindSpot(vect(36,36,86),ResPoint);
|
||||||
if (VSizeSq(LastDied.Location-ResPoint)<1.f) // Prevent division by zero errors in future.
|
if (VSizeSq(LastDied.Location-ResPoint)<1.f) // Prevent division by zero errors in future.
|
||||||
ResPoint.Z+=5;
|
ResPoint.Z+=5;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user