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, Inventory inventoryChain,
InventoryAPI.DualWieldingRole requiredRole) InventoryAPI.DualWieldingRole requiredRole)
{ {
local InventoryAPI api; local InventoryAPIBase api;
local class<KFWeapon> nextWeaponClass; local class<KFWeapon> nextWeaponClass;
local class<KFWeaponPickup> itemRoot, nextRoot; local class<KFWeaponPickup> itemRoot, nextRoot;
api = _server.unreal.inventory; api = _server.unreal.inventory;

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

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

2
sources/ServerRealm/ServerGlobal.uc

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

Loading…
Cancel
Save