zedtest3 #3

Merged
dkanus merged 15 commits from :zedtest3 into master 2022-01-21 11:56:43 +03:00
8 changed files with 141 additions and 141 deletions
Showing only changes of commit 429a95b863 - Show all commits

View File

@ -1,7 +1,7 @@
// ScrN copy
class NiceFreezeParticlesDirectional extends NiceFreezeParticlesBase;
simulated function Trigger(Actor other, Pawn eventInstigator){
emitters[0].SpawnParticle(1);
emitters[0].SpawnParticle(1);
}
defaultproperties
{

View File

@ -1,8 +1,8 @@
class NiceIceChunkEmitter extends Emitter;
var() array<Sound> ImpactSounds;
simulated function PostBeginPlay(){
if(ImpactSounds.Length > 0)
PlaySound(ImpactSounds[Rand(ImpactSounds.Length)]);
if(ImpactSounds.Length > 0)
PlaySound(ImpactSounds[Rand(ImpactSounds.Length)]);
}
// NICETODO: change linksfrom HTeac_A to NicePackSM (and change that file)
defaultproperties

View File

@ -1,87 +1,87 @@
class NiceGUIBuyMenu extends UT2k4MainPage;
//The "Header"
var automated GUIImage HeaderBG_Left;
var automated GUIImage HeaderBG_Center;
var automated GUIImage HeaderBG_Right;
var automated GUILabel CurrentPerkLabel;
var automated GUILabel TimeLeftLabel;
var automated GUILabel WaveLabel;
var automated GUILabel HeaderBG_Left_Label;
var automated KFQuickPerkSelect QuickPerkSelect;
var automated GUIImage HeaderBG_Left;
var automated GUIImage HeaderBG_Center;
var automated GUIImage HeaderBG_Right;
var automated GUILabel CurrentPerkLabel;
var automated GUILabel TimeLeftLabel;
var automated GUILabel WaveLabel;
var automated GUILabel HeaderBG_Left_Label;
var automated KFQuickPerkSelect QuickPerkSelect;
var automated KFBuyMenuFilter BuyMenuFilter;
var automated GUIButton StoreTabButton;
var automated GUIButton PerkTabButton;
var automated GUIButton StoreTabButton;
var automated GUIButton PerkTabButton;
//The "Footer"
var automated GUIImage WeightBG;
var automated GUIImage WeightIcon;
var automated GUIImage WeightIconBG;
var automated KFWeightBar WeightBar;
var automated GUIImage WeightBG;
var automated GUIImage WeightIcon;
var automated GUIImage WeightIconBG;
var automated KFWeightBar WeightBar;
//const BUYLIST_CATS =7;
var() editconst noexport float SavedPitch;
var color RedColor;
var color GreenGreyColor;
var() UT2K4TabPanel ActivePanel;
var localized string CurrentPerk;
var localized string NoActivePerk;
var localized string TraderClose;
var localized string WaveString;
var localized string LvAbbrString;
var() editconst noexport float SavedPitch;
var color RedColor;
var color GreenGreyColor;
var() UT2K4TabPanel ActivePanel;
var localized string CurrentPerk;
var localized string NoActivePerk;
var localized string TraderClose;
var localized string WaveString;
var localized string LvAbbrString;
function InitComponent(GUIController MyC, GUIComponent MyO)
{
local int i;
super.InitComponent(MyC, MyO);
c_Tabs.BackgroundImage = none;
c_Tabs.BackgroundStyle = none;
InitTabs();
for ( i = 0; i < c_Tabs.TabStack.Length; i++ )
{
c_Tabs.TabStack[i].bVisible = false;
}
UpdateWeightBar();
local int i;
super.InitComponent(MyC, MyO);
c_Tabs.BackgroundImage = none;
c_Tabs.BackgroundStyle = none;
InitTabs();
for ( i = 0; i < c_Tabs.TabStack.Length; i++ )
{
c_Tabs.TabStack[i].bVisible = false;
}
UpdateWeightBar();
}
function InitTabs()
{
local int i;
for ( i = 0; i < PanelCaption.Length && i < PanelClass.Length && i < PanelHint.Length; i++ )
{
c_Tabs.AddTab(PanelCaption[i], PanelClass[i],, PanelHint[i]);
}
local int i;
for ( i = 0; i < PanelCaption.Length && i < PanelClass.Length && i < PanelHint.Length; i++ )
{
c_Tabs.AddTab(PanelCaption[i], PanelClass[i],, PanelHint[i]);
}
}
function UpdateWeightBar()
{
if ( KFHumanPawn(PlayerOwner().Pawn) != none )
{
WeightBar.MaxBoxes = KFHumanPawn(PlayerOwner().Pawn).MaxCarryWeight;
WeightBar.CurBoxes = KFHumanPawn(PlayerOwner().Pawn).CurrentWeight;
}
if ( KFHumanPawn(PlayerOwner().Pawn) != none )
{
WeightBar.MaxBoxes = KFHumanPawn(PlayerOwner().Pawn).MaxCarryWeight;
WeightBar.CurBoxes = KFHumanPawn(PlayerOwner().Pawn).CurrentWeight;
}
}
event Opened(GUIComponent Sender)
{
local rotator PlayerRot;
super.Opened(Sender);
c_Tabs.ActivateTabByName(PanelCaption[0], true);
// Tell the controller that he is on a shopping spree
local rotator PlayerRot;
super.Opened(Sender);
c_Tabs.ActivateTabByName(PanelCaption[0], true);
// Tell the controller that he is on a shopping spree
if ( KFPlayerController(PlayerOwner()) != none )
{
{
KFPlayerController(PlayerOwner()).bShopping = true;
}
if ( KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).bAimingRifle )
{
KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).IronSightZoomOut();
}
// Set camera's pitch to zero when menu initialised (otherwise spinny weap goes kooky)
PlayerRot = PlayerOwner().Rotation;
SavedPitch = PlayerRot.Pitch;
PlayerRot.Yaw = PlayerRot.Yaw % 65536;
PlayerRot.Pitch = 0;
PlayerRot.Roll = 0;
PlayerOwner().SetRotation(PlayerRot);
SetTimer(0.05f, true);
{
KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).IronSightZoomOut();
}
// Set camera's pitch to zero when menu initialised (otherwise spinny weap goes kooky)
PlayerRot = PlayerOwner().Rotation;
SavedPitch = PlayerRot.Pitch;
PlayerRot.Yaw = PlayerRot.Yaw % 65536;
PlayerRot.Pitch = 0;
PlayerRot.Roll = 0;
PlayerOwner().SetRotation(PlayerRot);
SetTimer(0.05f, true);
}
function Timer()
{
UpdateHeader();
UpdateWeightBar();
UpdateHeader();
UpdateWeightBar();
}
function InternalOnClose(optional bool bCanceled)
{
@ -94,81 +94,81 @@ function InternalOnClose(optional bool bCanceled)
}
function UpdateHeader()
{
local int TimeLeftMin, TimeLeftSec;
local string TimeString;
if ( KFPlayerController(PlayerOwner()) == none || PlayerOwner().PlayerReplicationInfo == none ||
PlayerOwner().GameReplicationInfo == none )
{
return;
}
// Current Perk
if ( KFPlayerController(PlayerOwner()).SelectedVeterancy != none )
local int TimeLeftMin, TimeLeftSec;
local string TimeString;
if ( KFPlayerController(PlayerOwner()) == none || PlayerOwner().PlayerReplicationInfo == none ||
PlayerOwner().GameReplicationInfo == none )
{
CurrentPerkLabel.Caption = CurrentPerk$":" @ KFPlayerController(PlayerOwner()).SelectedVeterancy.default.VeterancyName @ LvAbbrString$KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo).ClientVeteranSkillLevel;
}
return;
}
// Current Perk
if ( KFPlayerController(PlayerOwner()).SelectedVeterancy != none )
{
CurrentPerkLabel.Caption = CurrentPerk$":" @ KFPlayerController(PlayerOwner()).SelectedVeterancy.default.VeterancyName @ LvAbbrString$KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo).ClientVeteranSkillLevel;
}
else
{
CurrentPerkLabel.Caption = CurrentPerk$":" @ NoActivePerk;
}
// Trader time left
TimeLeftMin = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave / 60;
TimeLeftSec = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave % 60;
if ( TimeLeftMin < 1 )
{
TimeString = "00:";
}
else
{
TimeString = "0" $ TimeLeftMin $ ":";
}
if ( TimeLeftSec >= 10 )
{
TimeString = TimeString $ TimeLeftSec;
}
else
{
TimeString = TimeString $ "0" $ TimeLeftSec;
}
TimeLeftLabel.Caption = TraderClose @ TimeString;
if ( KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave < 10 )
{
TimeLeftLabel.TextColor = RedColor;
}
else
{
TimeLeftLabel.TextColor = GreenGreyColor;
}
// Wave Counter
WaveLabel.Caption = WaveString$":" @ (KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).WaveNumber + 1)$"/"$KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).FinalWave;
{
CurrentPerkLabel.Caption = CurrentPerk$":" @ NoActivePerk;
}
// Trader time left
TimeLeftMin = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave / 60;
TimeLeftSec = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave % 60;
if ( TimeLeftMin < 1 )
{
TimeString = "00:";
}
else
{
TimeString = "0" $ TimeLeftMin $ ":";
}
if ( TimeLeftSec >= 10 )
{
TimeString = TimeString $ TimeLeftSec;
}
else
{
TimeString = TimeString $ "0" $ TimeLeftSec;
}
TimeLeftLabel.Caption = TraderClose @ TimeString;
if ( KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave < 10 )
{
TimeLeftLabel.TextColor = RedColor;
}
else
{
TimeLeftLabel.TextColor = GreenGreyColor;
}
// Wave Counter
WaveLabel.Caption = WaveString$":" @ (KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).WaveNumber + 1)$"/"$KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).FinalWave;
}
function KFBuyMenuClosed(optional bool bCanceled)
{
local rotator NewRot;
// Reset player
NewRot = PlayerOwner().Rotation;
NewRot.Pitch = SavedPitch;
PlayerOwner().SetRotation(NewRot);
Super.OnClose(bCanceled);
if ( KFPlayerController(PlayerOwner()) != none )
{
local rotator NewRot;
// Reset player
NewRot = PlayerOwner().Rotation;
NewRot.Pitch = SavedPitch;
PlayerOwner().SetRotation(NewRot);
Super.OnClose(bCanceled);
if ( KFPlayerController(PlayerOwner()) != none )
{
KFPlayerController(PlayerOwner()).bShopping = false;
}
}
function CloseSale(bool savePurchases)
{
Controller.CloseMenu(!savePurchases);
Controller.CloseMenu(!savePurchases);
}
function bool ButtonClicked(GUIComponent Sender)
{
if ( Sender == PerkTabButton )
if ( Sender == PerkTabButton )
{
HandleParameters(PanelCaption[1], "OhHi!");
}
if ( Sender == StoreTabButton )
HandleParameters(PanelCaption[1], "OhHi!");
}
if ( Sender == StoreTabButton )
{
HandleParameters(PanelCaption[0], "OhHi!");
}
return true;
HandleParameters(PanelCaption[0], "OhHi!");
}
return true;
}
defaultproperties
{

View File

@ -5,7 +5,7 @@ static function UpdateWeight(NicePlayerController nicePlayer){
local NiceHumanPawn nicePawn;
if(nicePawn == none || nicePawn.KFPRI == none) return;
nicePawn.maxCarryWeight = nicePawn.default.maxCarryWeight;
if(nicePawn.KFPRI.clientVeteranSkill != none)
if(nicePawn.KFPRI.clientVeteranSkill != none)
nicePawn.maxCarryWeight += nicePawn.KFPRI.clientVeteranSkill.static.AddCarryMaxWeight(nicePawn.KFPRI);
}
function static SkillSelected(NicePlayerController nicePlayer){

View File

@ -1,11 +1,11 @@
class NiceDamTypePipeBomb extends NiceWeaponDamageType;
static function GetHitEffects(out class<xEmitter> HitEffects[4], int VictimHealth)
{
HitEffects[0] = class'HitSmoke';
if(VictimHealth <= 0)
HitEffects[1] = class'KFHitFlame';
else if (FRand() < 0.8)
HitEffects[1] = class'KFHitFlame';
HitEffects[0] = class'HitSmoke';
if(VictimHealth <= 0)
HitEffects[1] = class'KFHitFlame';
else if (FRand() < 0.8)
HitEffects[1] = class'KFHitFlame';
}
defaultproperties
{

View File

@ -2,22 +2,22 @@
class NiceCryoNadeCloud extends Emitter;
var bool bFlashed;
simulated function PostBeginPlay(){
super.PostBeginPlay();
NadeLight();
super.PostBeginPlay();
NadeLight();
}
simulated function NadeLight(){
if(instigator == none) return;
if(Level.bDropDetail) return;
if( (Level.TimeSeconds - LastRenderTime < 0.2)
if( (Level.TimeSeconds - LastRenderTime < 0.2)
|| (PlayerController(instigator.controller) != none)){
bDynamicLight = true;
SetTimer(0.25, false);
}
else
bDynamicLight = true;
SetTimer(0.25, false);
}
else
Timer();
}
simulated function Timer(){
bDynamicLight = false;
bDynamicLight = false;
}
defaultproperties
{

View File

@ -1,5 +1,5 @@
class NiceDamTypePoundCrushed extends NiceZedMeleeDamageType
abstract;
abstract;
defaultproperties
{
DeathString="%o was pounded by %k."

View File

@ -16,8 +16,8 @@
class NiceMonsterController extends KFMonsterController;
// Just reset threat assesment flag, since it's not used in NicePack
function PostBeginPlay(){
super.PostBeginPlay();
bUseThreatAssessment = true;
super.PostBeginPlay();
bUseThreatAssessment = true;
}
event bool NotifyBump(Actor other){
local Pawn otherPawn;