Browse Source

Fix `ServerUnrealAPI` not using base API classes

pull/8/head
Anton Tarasenko 2 years ago
parent
commit
6d3edfa545
  1. 2
      sources/Gameplay/KF1Frontend/BaseImplementation/EKFInventory.uc
  2. 16
      sources/ServerRealm/API/Unreal/ServerUnrealAPIBase.uc
  3. 2
      sources/ServerRealm/ServerGlobal.uc

2
sources/Gameplay/KF1Frontend/BaseImplementation/EKFInventory.uc

@ -241,7 +241,7 @@ private function KFWeapon GetByRootWithDualRole(
Inventory inventoryChain,
InventoryAPI.DualWieldingRole requiredRole)
{
local InventoryAPI api;
local InventoryAPIBase api;
local class<KFWeapon> nextWeaponClass;
local class<KFWeaponPickup> itemRoot, nextRoot;
api = _server.unreal.inventory;

16
sources/ServerRealm/API/Unreal/ServerUnrealAPIBase.uc

@ -23,10 +23,10 @@ class ServerUnrealAPIBase extends UnrealAPIBase
var protected bool initialized;
var public MutatorAPI mutator;
var public GameRulesAPI gameRules;
var public BroadcastAPI broadcasts;
var public InventoryAPI inventory;
var public MutatorAPIBase mutator;
var public GameRulesAPIBase gameRules;
var public BroadcastAPIBase broadcasts;
var public InventoryAPIBase inventory;
public function Initialize(class<ServerAcediaAdapter> adapterClass)
{
@ -37,13 +37,13 @@ public function Initialize(class<ServerAcediaAdapter> adapterClass)
if (adapterClass == none) {
return;
}
mutator = MutatorAPI(_.memory.Allocate(
mutator = MutatorAPIBase(_.memory.Allocate(
adapterClass.default.serverMutatorAPIClass));
gameRules = GameRulesAPI(_.memory.Allocate(
gameRules = GameRulesAPIBase(_.memory.Allocate(
adapterClass.default.serverGameRulesAPIClass));
broadcasts = BroadcastAPI(_.memory.Allocate(
broadcasts = BroadcastAPIBase(_.memory.Allocate(
adapterClass.default.serverBroadcastAPIClass));
inventory = InventoryAPI(_.memory.Allocate(
inventory = InventoryAPIBase(_.memory.Allocate(
adapterClass.default.serverInventoryAPIClass));
}

2
sources/ServerRealm/ServerGlobal.uc

@ -64,7 +64,7 @@ protected function Initialize()
return;
}
_ = class'Global'.static.GetInstance();
unreal = ServerUnrealAPI(
unreal = ServerUnrealAPIBase(
_.memory.Allocate(serverAdapterClass.default.serverUnrealAPIClass));
unreal.Initialize(serverAdapterClass);
time = ServerTimeAPI(

Loading…
Cancel
Save