fix premature deletion of RepInfo
This commit is contained in:
parent
04851413f1
commit
7a761341d6
@ -87,7 +87,7 @@ private function PreInit()
|
|||||||
{
|
{
|
||||||
case `NO_CONFIG:
|
case `NO_CONFIG:
|
||||||
`Log_Info("Config created");
|
`Log_Info("Config created");
|
||||||
|
|
||||||
case MaxInt:
|
case MaxInt:
|
||||||
`Log_Info("Config updated to version"@LatestVersion);
|
`Log_Info("Config updated to version"@LatestVersion);
|
||||||
break;
|
break;
|
||||||
@ -154,7 +154,7 @@ private function PostInit()
|
|||||||
if (KFGI.KFGFxManagerClass != class'KFGameInfo_VersusSurvival'.default.KFGFxManagerClass)
|
if (KFGI.KFGFxManagerClass != class'KFGameInfo_VersusSurvival'.default.KFGFxManagerClass)
|
||||||
{
|
{
|
||||||
`Log_Warn("Found custom 'KFGFxManagerClass' (" $ KFGI.KFGFxManagerClass $ "), there may be compatibility issues");
|
`Log_Warn("Found custom 'KFGFxManagerClass' (" $ KFGI.KFGFxManagerClass $ "), there may be compatibility issues");
|
||||||
`Log_Warn("If you notice problems, try disabling DLC unlock");
|
`Log_Warn("If you notice problems, try disabling UnlockDLC");
|
||||||
}
|
}
|
||||||
|
|
||||||
KFGI.KFGFxManagerClass = class'CTI_GFxMoviePlayer_Manager_Versus';
|
KFGI.KFGFxManagerClass = class'CTI_GFxMoviePlayer_Manager_Versus';
|
||||||
@ -168,7 +168,7 @@ private function PostInit()
|
|||||||
if (KFGI.KFGFxManagerClass != class'KFGameInfo'.default.KFGFxManagerClass)
|
if (KFGI.KFGFxManagerClass != class'KFGameInfo'.default.KFGFxManagerClass)
|
||||||
{
|
{
|
||||||
`Log_Warn("Found custom 'KFGFxManagerClass' (" $ KFGI.KFGFxManagerClass $ "), there may be compatibility issues");
|
`Log_Warn("Found custom 'KFGFxManagerClass' (" $ KFGI.KFGFxManagerClass $ "), there may be compatibility issues");
|
||||||
`Log_Warn("If you notice problems, try disabling DLC unlock");
|
`Log_Warn("If you notice problems, try disabling UnlockDLC");
|
||||||
}
|
}
|
||||||
|
|
||||||
KFGI.KFGFxManagerClass = class'CTI_GFxMoviePlayer_Manager';
|
KFGI.KFGFxManagerClass = class'CTI_GFxMoviePlayer_Manager';
|
||||||
|
@ -34,7 +34,7 @@ replication
|
|||||||
public simulated function bool SafeDestroy()
|
public simulated function bool SafeDestroy()
|
||||||
{
|
{
|
||||||
`Log_Trace(`Location);
|
`Log_Trace(`Location);
|
||||||
|
|
||||||
return (bPendingDelete || bDeleteMe || Destroy());
|
return (bPendingDelete || bDeleteMe || Destroy());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,10 +138,12 @@ private simulated function UpdateNotification(String Title, String Downloading,
|
|||||||
private reliable client function ClientSync(class<KFWeaponDefinition> WeapDef, optional bool Remove = false)
|
private reliable client function ClientSync(class<KFWeaponDefinition> WeapDef, optional bool Remove = false)
|
||||||
{
|
{
|
||||||
`Log_Trace(`Location);
|
`Log_Trace(`Location);
|
||||||
|
|
||||||
if (WeapDef == None)
|
if (WeapDef == None)
|
||||||
{
|
{
|
||||||
`Log_Fatal("WeapDef is:" @ WeapDef);
|
`Log_Fatal("WeapDef is:" @ WeapDef);
|
||||||
|
Cleanup();
|
||||||
|
ConsoleCommand("Disconnect");
|
||||||
SafeDestroy();
|
SafeDestroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -187,12 +189,12 @@ private simulated function KeepNotification()
|
|||||||
private simulated reliable client function ClientSyncFinished()
|
private simulated reliable client function ClientSyncFinished()
|
||||||
{
|
{
|
||||||
local KFGameReplicationInfo KFGRI;
|
local KFGameReplicationInfo KFGRI;
|
||||||
|
|
||||||
`Log_Trace(`Location);
|
`Log_Trace(`Location);
|
||||||
|
|
||||||
if (WorldInfo.GRI == None)
|
if (WorldInfo.GRI == None)
|
||||||
{
|
{
|
||||||
`Log_Debug("ClientSyncFinished: WorldInfo.GRI == None");
|
`Log_Debug("ClientSyncFinished: Waiting GRI");
|
||||||
NotificationHeaderText = "Waiting for GameReplicationInfo...";
|
NotificationHeaderText = "Waiting for GameReplicationInfo...";
|
||||||
NotificationLeftText = String(++WaitingGRI) $ "s";
|
NotificationLeftText = String(++WaitingGRI) $ "s";
|
||||||
SetTimer(1.0f, false, nameof(ClientSyncFinished));
|
SetTimer(1.0f, false, nameof(ClientSyncFinished));
|
||||||
@ -202,11 +204,13 @@ private simulated reliable client function ClientSyncFinished()
|
|||||||
KFGRI = KFGameReplicationInfo(WorldInfo.GRI);
|
KFGRI = KFGameReplicationInfo(WorldInfo.GRI);
|
||||||
if (KFGRI == None)
|
if (KFGRI == None)
|
||||||
{
|
{
|
||||||
`Log_Fatal("Incompatible Replication info:" @ WorldInfo.GRI);
|
`Log_Fatal("Incompatible Replication info:" @ String(WorldInfo.GRI));
|
||||||
ClearTimer(nameof(KeepNotification));
|
ClearTimer(nameof(KeepNotification));
|
||||||
UpdateNotification(
|
UpdateNotification(
|
||||||
"Error: Incompatible Replication info:" @ WorldInfo.GRI,
|
"Error: Incompatible Replication info:" @ String(WorldInfo.GRI),
|
||||||
"", "", 0);
|
"Disconnect...", "", 0);
|
||||||
|
Cleanup();
|
||||||
|
ConsoleCommand("Disconnect");
|
||||||
SafeDestroy();
|
SafeDestroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -217,9 +221,23 @@ private simulated reliable client function ClientSyncFinished()
|
|||||||
ClearTimer(nameof(KeepNotification));
|
ClearTimer(nameof(KeepNotification));
|
||||||
ShowReadyButton();
|
ShowReadyButton();
|
||||||
|
|
||||||
|
Cleanup();
|
||||||
|
|
||||||
SafeDestroy();
|
SafeDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private reliable server function Cleanup()
|
||||||
|
{
|
||||||
|
`Log_Trace(`Location);
|
||||||
|
|
||||||
|
`Log_Debug("Cleanup");
|
||||||
|
if (!CTI.DestroyRepLink(Controller(Owner)))
|
||||||
|
{
|
||||||
|
`Log_Debug("Cleanup (forced)");
|
||||||
|
SafeDestroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public reliable server function ServerSync()
|
public reliable server function ServerSync()
|
||||||
{
|
{
|
||||||
`Log_Trace(`Location);
|
`Log_Trace(`Location);
|
||||||
@ -232,13 +250,7 @@ public reliable server function ServerSync()
|
|||||||
if (SyncSize <= Recieved || WorldInfo.NetMode == NM_StandAlone)
|
if (SyncSize <= Recieved || WorldInfo.NetMode == NM_StandAlone)
|
||||||
{
|
{
|
||||||
`Log_Debug("ServerSync: SyncFinished");
|
`Log_Debug("ServerSync: SyncFinished");
|
||||||
|
|
||||||
ClientSyncFinished();
|
ClientSyncFinished();
|
||||||
|
|
||||||
if (!CTI.DestroyRepLink(Controller(Owner)))
|
|
||||||
{
|
|
||||||
SafeDestroy();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -264,6 +276,5 @@ defaultproperties
|
|||||||
|
|
||||||
NotificationHeaderText = "Sync trader items, please wait..."
|
NotificationHeaderText = "Sync trader items, please wait..."
|
||||||
NotificationPercent = 0
|
NotificationPercent = 0
|
||||||
|
|
||||||
WaitingGRI = 0
|
WaitingGRI = 0
|
||||||
}
|
}
|
||||||
|
@ -51,8 +51,8 @@ For example: [b]Item=WeaponPack.KFWeapDef_XM25[/b] will add [url=https://steamco
|
|||||||
📌 Mutator does not contain custom weapons. You must have the required weapon packs in your subscriptions to be able to add them to the trader.
|
📌 Mutator does not contain custom weapons. You must have the required weapon packs in your subscriptions to be able to add them to the trader.
|
||||||
📌 If you are using this mutator to add weapons, you should [b]not[/b] use mutators from weapon packs (just having them in subscriptions is enough).
|
📌 If you are using this mutator to add weapons, you should [b]not[/b] use mutators from weapon packs (just having them in subscriptions is enough).
|
||||||
📌 Unlike [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2193261170]DLC Weapon Unlocker[/url], a different method is used here.
|
📌 Unlike [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2193261170]DLC Weapon Unlocker[/url], a different method is used here.
|
||||||
[url=https://steamcommunity.com/sharedfiles/filedetails/?id=2193261170]DLC Weapon Unlocker[/url] creates clones of DLC weapons and adds them to the trader. This allows you not to replace any classes in the game, so Hunter mutator has better compatibility with other mutators. However, those who have already purchased the DLC will not be able to use their skins on clones.
|
[url=https://steamcommunity.com/sharedfiles/filedetails/?id=2193261170]DLC Weapon Unlocker[/url] creates clones of DLC weapons and adds them to the trader. This allows you not to replace any classes in the game, so Hunter mutator has better compatibility with other mutators, however you need to update DWU every time kf2 update comes out with new guns.
|
||||||
CTI unlocks DLC weapons differently - it changes the trader filter allowing you to buy original DLC weapons without restrictions. Those who bought the DLC can use their skins and you don't need to update the mutator when new kf2 updates are released - unlocking will work with future weapons as well. However, when you set UnlockDLC=True CTI replaces the [b]KFGFxMoviePlayer_Manager[/b] class, so CTI may not be compatible with mods that replaces this class too. If you notice any compatibility issues, try turning off UnlockDLC.
|
CTI unlocks DLC weapons differently - it changes the trader filter allowing you to buy original DLC weapons without restrictions. You don't need to update the mutator when new kf2 updates are released - unlocking will work with future weapons as well. However, when you set UnlockDLC=True CTI replaces the [b]KFGFxMoviePlayer_Manager[/b] class, so CTI may not be compatible with mods that replaces this class too. If you notice any compatibility issues, try turning off UnlockDLC.
|
||||||
You can use this built-in method or add weapons from [url=https://steamcommunity.com/workshop/filedetails/discussion/2193261170/3046108212603783998]DLC Weapon Unlocker[/url] - choose what suits you best.
|
You can use this built-in method or add weapons from [url=https://steamcommunity.com/workshop/filedetails/discussion/2193261170/3046108212603783998]DLC Weapon Unlocker[/url] - choose what suits you best.
|
||||||
|
|
||||||
[h1]Sources[/h1]
|
[h1]Sources[/h1]
|
||||||
|
Loading…
Reference in New Issue
Block a user