TSC removed, cya!
This commit is contained in:
parent
08ff5df2e7
commit
68e9c264fe
@ -487,19 +487,19 @@ simulated function ClientChangeWeapon(NiceWeapon newWeap){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate that client is not hacking.
|
// Validate that client is not hacking.
|
||||||
function bool CanBuyNow(){
|
function bool CanBuyNow()
|
||||||
|
{
|
||||||
local NicePlayerController niceController;
|
local NicePlayerController niceController;
|
||||||
|
|
||||||
niceController = NicePlayerController(Controller);
|
niceController = NicePlayerController(Controller);
|
||||||
if(niceController == none)
|
if (niceController == none)
|
||||||
return false;
|
return false;
|
||||||
if(NiceGameType(Level.Game) != none && NiceGameType(Level.Game).NicePackMutator != none
|
if (NiceGameType(Level.Game) != none && NiceGameType(Level.Game).NicePackMutator != none
|
||||||
&& NiceGameType(Level.Game).NicePackMutator.bIsPreGame)
|
&& NiceGameType(Level.Game).NicePackMutator.bIsPreGame)
|
||||||
return true;
|
return true;
|
||||||
if(NiceTSCGame(Level.Game) != none && NiceTSCGame(Level.Game).NicePackMutator != none
|
|
||||||
&& NiceTSCGame(Level.Game).NicePackMutator.bIsPreGame)
|
|
||||||
return true;
|
|
||||||
return Super.CanBuyNow();
|
return Super.CanBuyNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overridden to not modify dual pistols' weapon group
|
// Overridden to not modify dual pistols' weapon group
|
||||||
function bool AddInventory(inventory NewItem){
|
function bool AddInventory(inventory NewItem){
|
||||||
local KFWeapon weap;
|
local KFWeapon weap;
|
||||||
|
@ -54,7 +54,6 @@ var int deadBodyCounter;
|
|||||||
var ScrnBalance ScrnMut;
|
var ScrnBalance ScrnMut;
|
||||||
var ScrnGameType ScrnGT;
|
var ScrnGameType ScrnGT;
|
||||||
var NiceGameType NiceGT;
|
var NiceGameType NiceGT;
|
||||||
var NiceTSCGame NiceTSC;
|
|
||||||
var NicePack Mut;
|
var NicePack Mut;
|
||||||
var NiceRules GameRules;
|
var NiceRules GameRules;
|
||||||
var NiceStorageServer serverStorage;
|
var NiceStorageServer serverStorage;
|
||||||
@ -199,7 +198,6 @@ simulated function PostBeginPlay(){
|
|||||||
// Find game type and ScrN mutator
|
// Find game type and ScrN mutator
|
||||||
ScrnGT = ScrnGameType(Level.Game);
|
ScrnGT = ScrnGameType(Level.Game);
|
||||||
NiceGT = NiceGameType(Level.Game);
|
NiceGT = NiceGameType(Level.Game);
|
||||||
NiceTSC = NiceTSCGame(Level.Game);
|
|
||||||
if(ScrnGT == none){
|
if(ScrnGT == none){
|
||||||
Log("ERROR: Wrong GameType (requires at least ScrnGameType)", Class.Outer.Name);
|
Log("ERROR: Wrong GameType (requires at least ScrnGameType)", Class.Outer.Name);
|
||||||
Destroy();
|
Destroy();
|
||||||
@ -209,8 +207,6 @@ simulated function PostBeginPlay(){
|
|||||||
ScrnGT.LoginMenuClass = string(class'NiceInvasionLoginMenu');
|
ScrnGT.LoginMenuClass = string(class'NiceInvasionLoginMenu');
|
||||||
if(NiceGT != none)
|
if(NiceGT != none)
|
||||||
NiceGT.RegisterMutator(Self);
|
NiceGT.RegisterMutator(Self);
|
||||||
if(NiceTSC != none)
|
|
||||||
NiceTSC.RegisterMutator(Self);
|
|
||||||
ScrnMut = ScrnGT.ScrnBalanceMut;
|
ScrnMut = ScrnGT.ScrnBalanceMut;
|
||||||
if(bReplacePickups)
|
if(bReplacePickups)
|
||||||
ScrnMut.bReplacePickups = false;
|
ScrnMut.bReplacePickups = false;
|
||||||
|
@ -134,16 +134,17 @@ replication{
|
|||||||
ServerSetHLMessages, ServerMarkSettingsLoaded, ServerStartleZeds, ServerSetDisplayCounters,
|
ServerSetHLMessages, ServerMarkSettingsLoaded, ServerStartleZeds, ServerSetDisplayCounters,
|
||||||
ServerSetDisplayWeaponProgress, ActivateAbility;
|
ServerSetDisplayWeaponProgress, ActivateAbility;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called on server only!
|
// Called on server only!
|
||||||
function PostLogin(){
|
function PostLogin()
|
||||||
|
{
|
||||||
local NicePack.PlayerRecord record;
|
local NicePack.PlayerRecord record;
|
||||||
local NiceGameType NiceGT;
|
local NiceGameType NiceGT;
|
||||||
local NiceTSCGame TSCGT;
|
|
||||||
local ScrnCustomPRI ScrnPRI;
|
local ScrnCustomPRI ScrnPRI;
|
||||||
|
|
||||||
Super.PostLogin();
|
Super.PostLogin();
|
||||||
// Restore data
|
// Restore data
|
||||||
NiceGT = NiceGameType(Level.Game);
|
NiceGT = NiceGameType(Level.Game);
|
||||||
TSCGT = NiceTSCGame(Level.Game);
|
|
||||||
ScrnPRI = class'ScrnCustomPRI'.static.FindMe(PlayerReplicationInfo);
|
ScrnPRI = class'ScrnCustomPRI'.static.FindMe(PlayerReplicationInfo);
|
||||||
if(ScrnPRI != none)
|
if(ScrnPRI != none)
|
||||||
SteamID64 = ScrnPRI.GetSteamID64();
|
SteamID64 = ScrnPRI.GetSteamID64();
|
||||||
@ -167,6 +168,7 @@ function PostLogin(){
|
|||||||
// Spawn ability manager
|
// Spawn ability manager
|
||||||
abilityManager = Spawn(class'NiceAbilityManager', self);
|
abilityManager = Spawn(class'NiceAbilityManager', self);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function ClientPostLogin(){
|
simulated function ClientPostLogin(){
|
||||||
local int i, j, k;
|
local int i, j, k;
|
||||||
local bool bEntryExists;
|
local bool bEntryExists;
|
||||||
@ -1465,7 +1467,6 @@ defaultproperties
|
|||||||
effectsLimitSoft=100
|
effectsLimitSoft=100
|
||||||
effectsLimitHard=200
|
effectsLimitHard=200
|
||||||
sirenScreamMod=1.000000
|
sirenScreamMod=1.000000
|
||||||
TSCLobbyMenuClassString="NicePack.NiceTSCLobbyMenu"
|
|
||||||
LobbyMenuClassString="NicePack.NiceLobbyMenu"
|
LobbyMenuClassString="NicePack.NiceLobbyMenu"
|
||||||
PawnClass=class'NiceHumanPawn'
|
PawnClass=class'NiceHumanPawn'
|
||||||
}
|
}
|
||||||
|
@ -1,111 +0,0 @@
|
|||||||
class NiceTSCGame extends TSCGame;
|
|
||||||
// Copy-pasted from NiceGameType
|
|
||||||
var NicePack NicePackMutator;
|
|
||||||
function RegisterMutator(NicePack activePack){
|
|
||||||
NicePackMutator = activePack;
|
|
||||||
}
|
|
||||||
function SetupWave(){
|
|
||||||
Super.SetupWave();
|
|
||||||
// Event call
|
|
||||||
NicePackMutator.WaveStart();
|
|
||||||
}
|
|
||||||
function RestartPlayer(Controller aPlayer){
|
|
||||||
Super.RestartPlayer(aPlayer);
|
|
||||||
if(aPlayer.Pawn != none && NicePlayerController(aPlayer) != none)
|
|
||||||
NicePlayerController(aPlayer).PawnSpawned();
|
|
||||||
}
|
|
||||||
State MatchInProgress{
|
|
||||||
function BeginState(){
|
|
||||||
Super(Invasion).BeginState();
|
|
||||||
|
|
||||||
WaveNum = InitialWave;
|
|
||||||
InvasionGameReplicationInfo(GameReplicationInfo).WaveNumber = WaveNum;
|
|
||||||
|
|
||||||
if(NicePackMutator.bInitialTrader)
|
|
||||||
WaveCountDown = NicePackMutator.initialTraderTime + 10;
|
|
||||||
else
|
|
||||||
WaveCountDown = 10;
|
|
||||||
|
|
||||||
SetupPickups();
|
|
||||||
// Event call
|
|
||||||
NicePackMutator.MatchBegan();
|
|
||||||
}
|
|
||||||
function DoWaveEnd(){
|
|
||||||
Super.DoWaveEnd();
|
|
||||||
// Event call
|
|
||||||
NicePackMutator.TraderStart();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function DramaticEvent(float BaseZedTimePossibility, optional float DesiredZedTimeDuration){
|
|
||||||
local bool bWasZedTime;
|
|
||||||
bWasZedTime = bZEDTimeActive;
|
|
||||||
Super.DramaticEvent(BaseZedTimePossibility, DesiredZedTimeDuration);
|
|
||||||
// Call events
|
|
||||||
if(!bWasZedTime && bZEDTimeActive)
|
|
||||||
NicePackMutator.ZedTimeActivated();
|
|
||||||
}
|
|
||||||
event Tick(float DeltaTime){
|
|
||||||
local float TrueTimeFactor;
|
|
||||||
local Controller C;
|
|
||||||
if(bZEDTimeActive){
|
|
||||||
TrueTimeFactor = 1.1 / Level.TimeDilation;
|
|
||||||
CurrentZEDTimeDuration -= DeltaTime * TrueTimeFactor;
|
|
||||||
if(CurrentZEDTimeDuration < (ZEDTimeDuration*0.166) && CurrentZEDTimeDuration > 0 ){
|
|
||||||
if(!bSpeedingBackUp){
|
|
||||||
bSpeedingBackUp = true;
|
|
||||||
|
|
||||||
for(C = Level.ControllerList;C != none;C = C.NextController){
|
|
||||||
if(KFPlayerController(C)!= none)
|
|
||||||
KFPlayerController(C).ClientExitZedTime();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SetGameSpeed(Lerp( (CurrentZEDTimeDuration/(ZEDTimeDuration*0.166)), 1.0, 0.2 ));
|
|
||||||
}
|
|
||||||
if(CurrentZEDTimeDuration <= 0){
|
|
||||||
if(bZEDTimeActive)
|
|
||||||
NicePackMutator.ZedTimeDeactivated();
|
|
||||||
bZEDTimeActive = false;
|
|
||||||
bSpeedingBackUp = false;
|
|
||||||
SetGameSpeed(1.0);
|
|
||||||
ZedTimeExtensionsUsed = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function Killed(Controller Killer, Controller Killed, Pawn KilledPawn, class<DamageType> dmgType){
|
|
||||||
local KFSteamStatsAndAchievements StatsAndAchievements;
|
|
||||||
Super.Killed(Killer, Killed, KilledPawn, dmgType);
|
|
||||||
if(PlayerController(Killer) != none){
|
|
||||||
if (NiceMonster(KilledPawn) != none && Killed != Killer){
|
|
||||||
StatsAndAchievements = KFSteamStatsAndAchievements(PlayerController(Killer).SteamStatsAndAchievements);
|
|
||||||
if(StatsAndAchievements != none){
|
|
||||||
if(KilledPawn.IsA('NiceZombieStalker') || KilledPawn.IsA('MeanZombieStalker')){
|
|
||||||
if(class<NiceDamTypeWinchester>(dmgType) != none)
|
|
||||||
StatsAndAchievements.AddStalkerKillWithLAR();
|
|
||||||
}
|
|
||||||
else if(KilledPawn.IsA('NiceZombieClot') || KilledPawn.IsA('MeanZombieClot')){
|
|
||||||
if(class<NiceDamTypeWinchester>(dmgType) != none)
|
|
||||||
KFSteamStatsAndAchievements(PlayerController(Killer).SteamStatsAndAchievements).AddClotKillWithLAR();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Reloaded to award damage
|
|
||||||
function int ReduceDamage(int Damage, pawn injured, pawn instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType){
|
|
||||||
local NiceMonster niceZed;
|
|
||||||
local KFPlayerController PC;
|
|
||||||
niceZed = NiceMonster(Injured);
|
|
||||||
if(niceZed != none){
|
|
||||||
if(instigatedBy != none){
|
|
||||||
PC = KFPlayerController(instigatedBy.Controller);
|
|
||||||
if(class<NiceWeaponDamageType>(damageType) != none && PC != none)
|
|
||||||
class<NiceWeaponDamageType>(damageType).Static.AwardNiceDamage(KFSteamStatsAndAchievements(PC.SteamStatsAndAchievements), Clamp(Damage, 1, Injured.Health), niceZed.scrnRules.HardcoreLevel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Super.ReduceDamage(Damage, injured, InstigatedBy, HitLocation, Momentum, DamageType);
|
|
||||||
}
|
|
||||||
defaultproperties
|
|
||||||
{
|
|
||||||
GameName="Nice Team Survival Competition"
|
|
||||||
Description="Nice Edition of Team Survival Competition (TSCGame)."
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
class NiceTSCLobbyFooter extends NiceLobbyFooter;
|
|
||||||
defaultproperties
|
|
||||||
{
|
|
||||||
Begin Object Class=GUIButton Name=ReadyButton
|
|
||||||
Caption="Ready"
|
|
||||||
MenuState=MSAT_Disabled
|
|
||||||
Hint="Click to indicate you are ready to play"
|
|
||||||
WinTop=0.966146
|
|
||||||
WinLeft=0.280000
|
|
||||||
WinWidth=0.120000
|
|
||||||
WinHeight=0.033203
|
|
||||||
RenderWeight=2.000000
|
|
||||||
TabOrder=4
|
|
||||||
bBoundToParent=True
|
|
||||||
bVisible=False
|
|
||||||
ToolTip=None
|
|
||||||
|
|
||||||
OnClick=TSCLobbyFooter.OnFooterClick
|
|
||||||
OnKeyEvent=ReadyButton.InternalOnKeyEvent
|
|
||||||
End Object
|
|
||||||
b_Ready=ReadyButton
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
class NiceTSCLobbyMenu extends TSCLobbyMenu;
|
|
||||||
defaultproperties
|
|
||||||
{
|
|
||||||
Begin Object Class=NiceTSCLobbyFooter Name=BuyFooter
|
|
||||||
RenderWeight=0.300000
|
|
||||||
TabOrder=8
|
|
||||||
bBoundToParent=False
|
|
||||||
bScaleToParent=False
|
|
||||||
OnPreDraw=BuyFooter.InternalOnPreDraw
|
|
||||||
End Object
|
|
||||||
t_Footer=BuyFooter
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user