wip
This commit is contained in:
parent
ffe9e72279
commit
2143f43bb6
@ -7,7 +7,6 @@ var config int ConfigVersion;
|
|||||||
var config int WeapLifespan;
|
var config int WeapLifespan;
|
||||||
var config int DoshLifespan;
|
var config int DoshLifespan;
|
||||||
|
|
||||||
var config array<string> AdminList;
|
|
||||||
var config array<int> PerPlayerMaxMonsters;
|
var config array<int> PerPlayerMaxMonsters;
|
||||||
|
|
||||||
var public bool bXpNotifications;
|
var public bool bXpNotifications;
|
||||||
@ -15,7 +14,6 @@ var bool bInitialized;
|
|||||||
|
|
||||||
var array<MskGsRepInfo> RepClients;
|
var array<MskGsRepInfo> RepClients;
|
||||||
var array<Controller> MskGsMemberList;
|
var array<Controller> MskGsMemberList;
|
||||||
var array<UniqueNetId> AdminUIDList;
|
|
||||||
|
|
||||||
function InitMutator(string Options, out string ErrorMessage)
|
function InitMutator(string Options, out string ErrorMessage)
|
||||||
{
|
{
|
||||||
@ -85,10 +83,6 @@ simulated event PostBeginPlay()
|
|||||||
|
|
||||||
function Initialize()
|
function Initialize()
|
||||||
{
|
{
|
||||||
local OnlineSubsystem steamworks;
|
|
||||||
local string Person;
|
|
||||||
local UniqueNetId PersonUID;
|
|
||||||
|
|
||||||
if (bInitialized) return;
|
if (bInitialized) return;
|
||||||
|
|
||||||
if (MyKFGI == None || MyKFGI.MyKFGRI == None)
|
if (MyKFGI == None || MyKFGI.MyKFGRI == None)
|
||||||
@ -127,23 +121,6 @@ function Initialize()
|
|||||||
MskGs_WeeklySurvival(MyKFGI).Mut = Self;
|
MskGs_WeeklySurvival(MyKFGI).Mut = Self;
|
||||||
}
|
}
|
||||||
|
|
||||||
steamworks = class'GameEngine'.static.GetOnlineSubsystem();
|
|
||||||
|
|
||||||
foreach AdminList(Person)
|
|
||||||
{
|
|
||||||
if (IsUID(Person) && steamworks.StringToUniqueNetId(Person, PersonUID))
|
|
||||||
{
|
|
||||||
if (AdminUIDList.Find('Uid', PersonUID.Uid) == -1)
|
|
||||||
AdminUIDList.AddItem(PersonUID);
|
|
||||||
}
|
|
||||||
else if (steamworks.Int64ToUniqueNetId(Person, PersonUID))
|
|
||||||
{
|
|
||||||
if (AdminUIDList.Find('Uid', PersonUID.Uid) == -1)
|
|
||||||
AdminUIDList.AddItem(PersonUID);
|
|
||||||
}
|
|
||||||
else `Log("[MskGsMut] WARN: Can't add admin:"@Person);
|
|
||||||
}
|
|
||||||
|
|
||||||
ModifySpawnManager();
|
ModifySpawnManager();
|
||||||
|
|
||||||
`Log("[MskGsMut] Mutator loaded.");
|
`Log("[MskGsMut] Mutator loaded.");
|
||||||
@ -204,21 +181,6 @@ function bool CheckRelevance(Actor Other)
|
|||||||
return SuperRelevant;
|
return SuperRelevant;
|
||||||
}
|
}
|
||||||
|
|
||||||
function bool PreventDeath(Pawn Killed, Controller Killer, class<DamageType> damageType, vector HitLocation)
|
|
||||||
{
|
|
||||||
local KFWeapon TempWeapon;
|
|
||||||
local KFPawn_Human KFP;
|
|
||||||
|
|
||||||
KFP = KFPawn_Human(Killed);
|
|
||||||
|
|
||||||
if (Role >= ROLE_Authority && KFP != None && KFP.InvManager != none)
|
|
||||||
foreach KFP.InvManager.InventoryActors(class'KFWeapon', TempWeapon)
|
|
||||||
if (TempWeapon != none && TempWeapon.bDropOnDeath && TempWeapon.CanThrow())
|
|
||||||
KFP.TossInventory(TempWeapon);
|
|
||||||
|
|
||||||
return Super.PreventDeath(Killed, Killer, damageType, HitLocation);
|
|
||||||
}
|
|
||||||
|
|
||||||
function AddMskGsMember(Controller C)
|
function AddMskGsMember(Controller C)
|
||||||
{
|
{
|
||||||
MskGsMemberList.AddItem(C);
|
MskGsMemberList.AddItem(C);
|
||||||
@ -257,9 +219,6 @@ function NotifyLogin(Controller C)
|
|||||||
RepInfo.Mut = Self;
|
RepInfo.Mut = Self;
|
||||||
RepClients.AddItem(RepInfo);
|
RepClients.AddItem(RepInfo);
|
||||||
|
|
||||||
if (AdminUIDList.Find('Uid', C.PlayerReplicationInfo.UniqueId.Uid) != -1)
|
|
||||||
C.PlayerReplicationInfo.bAdmin = true;
|
|
||||||
|
|
||||||
super.NotifyLogin(C);
|
super.NotifyLogin(C);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1,9 @@
|
|||||||
Who are you? What are you doing here? O_o
|
Mutator providing some functions of [url=https://steamcommunity.com/groups/msk-gs]MSK-GS[/url] servers.
|
||||||
|
|
||||||
|
Contains implementations of my ideas and/or combinations of other mutators for compatibility.
|
||||||
|
|
||||||
|
Not intended for use with other servers and will never be made available to the public, so don't ask me how to use it.
|
||||||
|
|
||||||
|
Of course I can't forbid you to use it, but then don't be surprised that your server can break at any second due to the fact that I suddenly decided to delete or redo something in this mutator.
|
||||||
|
|
||||||
|
If you are interested in some feature from this mutator, you can subscribe to [url=https://steamcommunity.com/id/GenZmeY/myworkshopfiles/]me in the steam workshop[/url] and follow my work. I try to post everything I do to the public. I think someday I will be able to put everything into separate mutators and abandon this hodgepodge.
|
Binary file not shown.
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 269 KiB |
Loading…
Reference in New Issue
Block a user