Merge master

This commit is contained in:
Ted Nyman
2013-11-16 12:33:18 -08:00
17 changed files with 2266 additions and 32 deletions

View File

@@ -0,0 +1,147 @@
Local bk = CreateBank(8)
PokeFloat bk, 0, -1
Print Bin(PeekInt(bk, 0))
Print %1000000000000000
Print Bin(1 Shl 31)
Print $1f
Print $ff
Print $1f + (127 - 15)
Print Hex(%01111111100000000000000000000000)
Print Hex(~%11111111100000000000000000000000)
Print Bin(FloatToHalf(-2.5))
Print HalfToFloat(FloatToHalf(-200000000000.0))
Print Bin(FToI(-2.5))
WaitKey
End
; Half-precision (16-bit) arithmetic library
;============================================
Global Half_CBank_
Function FToI(f#)
If Half_CBank_ = 0 Then Half_CBank_ = CreateBank(4)
PokeFloat Half_CBank_, 0, f
Return PeekInt(Half_CBank_, 0)
End Function
Function HalfToFloat#(h)
Local signBit, exponent, fraction, fBits
signBit = (h And 32768) <> 0
exponent = (h And %0111110000000000) Shr 10
fraction = (h And %0000001111111111)
If exponent = $1F Then exponent = $FF : ElseIf exponent Then exponent = (exponent - 15) + 127
fBits = (signBit Shl 31) Or (exponent Shl 23) Or (fraction Shl 13)
If Half_CBank_ = 0 Then Half_CBank_ = CreateBank(4)
PokeInt Half_CBank_, 0, fBits
Return PeekFloat(Half_CBank_, 0)
End Function
Function FloatToHalf(f#)
Local signBit, exponent, fraction, fBits
If Half_CBank_ = 0 Then Half_CBank_ = CreateBank(4)
PokeFloat Half_CBank_, 0, f
fBits = PeekInt(Half_CBank_, 0)
signBit = (fBits And (1 Shl 31)) <> 0
exponent = (fBits And $7F800000) Shr 23
fraction = fBits And $007FFFFF
If exponent
exponent = exponent - 127
If Abs(exponent) > $1F
If exponent <> ($FF - 127) Then fraction = 0
exponent = $1F * Sgn(exponent)
Else
exponent = exponent + 15
EndIf
exponent = exponent And %11111
EndIf
fraction = fraction Shr 13
Return (signBit Shl 15) Or (exponent Shl 10) Or fraction
End Function
Function HalfAdd(l, r)
End Function
Function HalfSub(l, r)
End Function
Function HalfMul(l, r)
End Function
Function HalfDiv(l, r)
End Function
Function HalfLT(l, r)
End Function
Function HalfGT(l, r)
End Function
; Double-precision (64-bit) arithmetic library)
;===============================================
Global DoubleOut[1], Double_CBank_
Function DoubleToFloat#(d[1])
End Function
Function FloatToDouble(f#)
End Function
Function IntToDouble(i)
End Function
Function SefToDouble(s, e, f)
End Function
Function DoubleAdd(l, r)
End Function
Function DoubleSub(l, r)
End Function
Function DoubleMul(l, r)
End Function
Function DoubleDiv(l, r)
End Function
Function DoubleLT(l, r)
End Function
Function DoubleGT(l, r)
End Function
;~IDEal Editor Parameters:
;~F#1A#20#2F
;~C#Blitz3D

369
samples/BlitzBasic/LList.bb Normal file
View File

@@ -0,0 +1,369 @@
; Double-linked list container class
;====================================
; with thanks to MusicianKool, for concept and issue fixes
Type LList
Field head_.ListNode
Field tail_.ListNode
End Type
Type ListNode
Field pv_.ListNode
Field nx_.ListNode
Field Value
End Type
Type Iterator
Field Value
Field l_.LList
Field cn_.ListNode, cni_
End Type
;Create a new LList object
Function CreateList.LList()
Local l.LList = New LList
l\head_ = New ListNode
l\tail_ = New ListNode
l\head_\nx_ = l\tail_ ;End caps
l\head_\pv_ = l\head_ ;These make it more or less safe to iterate freely
l\head_\Value = 0
l\tail_\nx_ = l\tail_
l\tail_\pv_ = l\head_
l\tail_\Value = 0
Return l
End Function
;Free a list and all elements (not any values)
Function FreeList(l.LList)
ClearList l
Delete l\head_
Delete l\tail_
Delete l
End Function
;Remove all the elements from a list (does not free values)
Function ClearList(l.LList)
Local n.ListNode = l\head_\nx_
While n <> l\tail_
Local nx.ListNode = n\nx_
Delete n
n = nx
Wend
l\head_\nx_ = l\tail_
l\tail_\pv_ = l\head_
End Function
;Count the number of elements in a list (slow)
Function ListLength(l.LList)
Local i.Iterator = GetIterator(l), elems
While EachIn(i)
elems = elems + 1
Wend
Return elems
End Function
;Return True if a list contains a given value
Function ListContains(l.LList, Value)
Return (ListFindNode(l, Value) <> Null)
End Function
;Create a linked list from the intvalues in a bank (slow)
Function ListFromBank.LList(bank)
Local l.LList = CreateList()
Local size = BankSize(bank), p
For p = 0 To size - 4 Step 4
ListAddLast l, PeekInt(bank, p)
Next
Return l
End Function
;Create a bank containing all the values in a list (slow)
Function ListToBank(l.LList)
Local size = ListLength(l) * 4
Local bank = CreateBank(size)
Local i.Iterator = GetIterator(l), p = 0
While EachIn(i)
PokeInt bank, p, i\Value
p = p + 4
Wend
Return bank
End Function
;Swap the contents of two list objects
Function SwapLists(l1.LList, l2.LList)
Local tempH.ListNode = l1\head_, tempT.ListNode = l1\tail_
l1\head_ = l2\head_
l1\tail_ = l2\tail_
l2\head_ = tempH
l2\tail_ = tempT
End Function
;Create a new list containing the same values as the first
Function CopyList.LList(lo.LList)
Local ln.LList = CreateList()
Local i.Iterator = GetIterator(lo) : While EachIn(i)
ListAddLast ln, i\Value
Wend
Return ln
End Function
;Reverse the order of elements of a list
Function ReverseList(l.LList)
Local n1.ListNode, n2.ListNode, tmp.ListNode
n1 = l\head_
n2 = l\head_\nx_
While n1 <> l\tail_
n1\pv_ = n2
tmp = n2\nx_
n2\nx_ = n1
n1 = n2
n2 = tmp
Wend
tmp = l\head_
l\head_ = l\tail_
l\tail_ = tmp
l\head_\pv_ = l\head_
l\tail_\nx_ = l\tail_
End Function
;Search a list to retrieve the first node with the given value
Function ListFindNode.ListNode(l.LList, Value)
Local n.ListNode = l\head_\nx_
While n <> l\tail_
If n\Value = Value Then Return n
n = n\nx_
Wend
Return Null
End Function
;Append a value to the end of a list (fast) and return the node
Function ListAddLast.ListNode(l.LList, Value)
Local n.ListNode = New ListNode
n\pv_ = l\tail_\pv_
n\nx_ = l\tail_
n\Value = Value
l\tail_\pv_ = n
n\pv_\nx_ = n
Return n
End Function
;Attach a value to the start of a list (fast) and return the node
Function ListAddFirst.ListNode(l.LList, Value)
Local n.ListNode = New ListNode
n\pv_ = l\head_
n\nx_ = l\head_\nx_
n\Value = Value
l\head_\nx_ = n
n\nx_\pv_ = n
Return n
End Function
;Remove the first occurence of the given value from a list
Function ListRemove(l.LList, Value)
Local n.ListNode = ListFindNode(l, Value)
If n <> Null Then RemoveListNode n
End Function
;Remove a node from a list
Function RemoveListNode(n.ListNode)
n\pv_\nx_ = n\nx_
n\nx_\pv_ = n\pv_
Delete n
End Function
;Return the value of the element at the given position from the start of the list,
;or backwards from the end of the list for a negative index
Function ValueAtIndex(l.LList, index)
Local n.ListNode = ListNodeAtIndex(l, index)
If n <> Null Then Return n\Value : Else Return 0
End Function
;Return the ListNode at the given position from the start of the list, or backwards
;from the end of the list for a negative index, or Null if invalid
Function ListNodeAtIndex.ListNode(l.LList, index)
Local e, n.ListNode
If index >= 0
n = l\head_
For e = 0 To index
n = n\nx_
Next
If n = l\tail_ Then n = Null ;Beyond the end of the list - not valid
Else ;Negative index - count backward
n = l\tail_
For e = 0 To index Step -1
n = n\pv_
Next
If n = l\head_ Then n = Null ;Before the start of the list - not valid
EndIf
Return n
End Function
;Replace a value at the given position (added by MusicianKool)
Function ReplaceValueAtIndex(l.LList,index,value)
Local n.ListNode = ListNodeAtIndex(l,index)
If n <> Null Then n\Value = value:Else Return 0
End Function
;Remove and return a value at the given position (added by MusicianKool)
Function RemoveNodeAtIndex(l.LList,index)
Local n.ListNode = ListNodeAtIndex(l,index),tval
If n <> Null Then tval = n\Value:RemoveListNode(n):Return tval:Else Return 0
End Function
;Retrieve the first value from a list
Function ListFirst(l.LList)
If l\head_\nx_ <> l\tail_ Then Return l\head_\nx_\Value
End Function
;Retrieve the last value from a list
Function ListLast(l.LList)
If l\tail_\pv_ <> l\head_ Then Return l\tail_\pv_\Value
End Function
;Remove the first element from a list, and return its value
Function ListRemoveFirst(l.LList)
Local val
If l\head_\nx_ <> l\tail_
val = l\head_\nx_\Value
RemoveListNode l\head_\nx_
EndIf
Return val
End Function
;Remove the last element from a list, and return its value
Function ListRemoveLast(l.LList)
Local val
If l\tail_\pv_ <> l\head_
val = l\tail_\pv_\Value
RemoveListNode l\tail_\pv_
EndIf
Return val
End Function
;Insert a value into a list before the specified node, and return the new node
Function InsertBeforeNode.ListNode(Value, n.ListNode)
Local bef.ListNode = New ListNode
bef\pv_ = n\pv_
bef\nx_ = n
bef\Value = Value
n\pv_ = bef
bef\pv_\nx_ = bef
Return bef
End Function
;Insert a value into a list after the specified node, and return then new node
Function InsertAfterNode.ListNode(Value, n.ListNode)
Local aft.ListNode = New ListNode
aft\nx_ = n\nx_
aft\pv_ = n
aft\Value = Value
n\nx_ = aft
aft\nx_\pv_ = aft
Return aft
End Function
;Get an iterator object to use with a loop
;This function means that most programs won't have to think about deleting iterators manually
;(in general only a small, constant number will be created)
Function GetIterator.Iterator(l.LList)
Local i.Iterator
If l = Null Then RuntimeError "Cannot create Iterator for Null"
For i = Each Iterator ;See if there's an available iterator at the moment
If i\l_ = Null Then Exit
Next
If i = Null Then i = New Iterator ;If there wasn't, create one
i\l_ = l
i\cn_ = l\head_
i\cni_ = -1
i\Value = 0 ;No especial reason why this has to be anything, but meh
Return i
End Function
;Use as the argument to While to iterate over the members of a list
Function EachIn(i.Iterator)
i\cn_ = i\cn_\nx_
If i\cn_ <> i\l_\tail_ ;Still items in the list
i\Value = i\cn_\Value
i\cni_ = i\cni_ + 1
Return True
Else
i\l_ = Null ;Disconnect from the list, having reached the end
i\cn_ = Null
i\cni_ = -1
Return False
EndIf
End Function
;Remove from the containing list the element currently pointed to by an iterator
Function IteratorRemove(i.Iterator)
If (i\cn_ <> i\l_\head_) And (i\cn_ <> i\l_\tail_)
Local temp.ListNode = i\cn_
i\cn_ = i\cn_\pv_
i\cni_ = i\cni_ - 1
i\Value = 0
RemoveListNode temp
Return True
Else
Return False
EndIf
End Function
;Call this before breaking out of an EachIn loop, to disconnect the iterator from the list
Function IteratorBreak(i.Iterator)
i\l_ = Null
i\cn_ = Null
i\cni_ = -1
i\Value = 0
End Function
;~IDEal Editor Parameters:
;~F#5#A#10#18#2A#32#3E#47#4C#58#66#6F#78#8F#9B#A9#B7#BD#C5#CC
;~F#E3#E9#EF#F4#F9#103#10D#11B#12B#13F#152#163
;~C#Blitz3D

View File

@@ -0,0 +1,66 @@
Local i, start, result
Local s.Sum3Obj = New Sum3Obj
For i = 1 To 100000
s = New Sum3Obj
result = Handle Before s
Delete s
Next
start = MilliSecs()
For i = 1 To 1000000
result = Sum3_(MakeSum3Obj(i, i, i))
Next
start = MilliSecs() - start
Print start
start = MilliSecs()
For i = 1 To 1000000
result = Sum3(i, i, i)
Next
start = MilliSecs() - start
Print start
WaitKey
End
Function Sum3(a, b, c)
Return a + b + c
End Function
Type Sum3Obj
Field isActive
Field a, b, c
End Type
Function MakeSum3Obj(a, b, c)
Local s.Sum3Obj = Last Sum3Obj
If s\isActive Then s = New Sum3Obj
s\isActive = True
s\a = a
s\b = b
s\c = c
Restore label
Read foo
Return Handle(s)
End Function
.label
Data (10 + 2), 12, 14
:
Function Sum3_(a_)
Local a.Sum3Obj = Object.Sum3Obj a_
Local return_ = a\a + a\b + a\c
Insert a Before First Sum3Obj :: a\isActive = False
Return return_
End Function
;~IDEal Editor Parameters:
;~C#Blitz3D

View File

@@ -0,0 +1,55 @@
patches-own [
living? ;; indicates if the cell is living
live-neighbors ;; counts how many neighboring cells are alive
]
to setup-blank
clear-all
ask patches [ cell-death ]
reset-ticks
end
to setup-random
clear-all
ask patches
[ ifelse random-float 100.0 < initial-density
[ cell-birth ]
[ cell-death ] ]
reset-ticks
end
to cell-birth
set living? true
set pcolor fgcolor
end
to cell-death
set living? false
set pcolor bgcolor
end
to go
ask patches
[ set live-neighbors count neighbors with [living?] ]
;; Starting a new "ask patches" here ensures that all the patches
;; finish executing the first ask before any of them start executing
;; the second ask. This keeps all the patches in synch with each other,
;; so the births and deaths at each generation all happen in lockstep.
ask patches
[ ifelse live-neighbors = 3
[ cell-birth ]
[ if live-neighbors != 2
[ cell-death ] ] ]
tick
end
to draw-cells
let erasing? [living?] of patch mouse-xcor mouse-ycor
while [mouse-down?]
[ ask patch mouse-xcor mouse-ycor
[ ifelse erasing?
[ cell-death ]
[ cell-birth ] ]
display ]
end

View File

@@ -0,0 +1,7 @@
appraise "rails32" do
gem 'rails', '~> 3.2.0'
end
appraise "rails40" do
gem 'rails', '~> 4.0.0'
end

View File

@@ -0,0 +1,644 @@
/*
* Copyright (c) 2008, 2013 Dainius "GreatEmerald" Masiliūnas
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
//-----------------------------------------------------------------------------
// MutU2Weapons.uc
// Mutator class for replacing weapons
// GreatEmerald, 2008
//-----------------------------------------------------------------------------
class MutU2Weapons extends Mutator
config(U2Weapons);
var() config string ReplacedWeaponClassNames0;
var() config string ReplacedWeaponClassNames1, ReplacedWeaponClassNames2, ReplacedWeaponClassNames3;
var() config string ReplacedWeaponClassNames4, ReplacedWeaponClassNames5, ReplacedWeaponClassNames6;
var() config string ReplacedWeaponClassNames7, ReplacedWeaponClassNames8, ReplacedWeaponClassNames9;
var() config string ReplacedWeaponClassNames10, ReplacedWeaponClassNames11, ReplacedWeaponClassNames12;
var() config bool bConfigUseU2Weapon0, bConfigUseU2Weapon1, bConfigUseU2Weapon2, bConfigUseU2Weapon3;
var() config bool bConfigUseU2Weapon4, bConfigUseU2Weapon5, bConfigUseU2Weapon6, bConfigUseU2Weapon7;
var() config bool bConfigUseU2Weapon8, bConfigUseU2Weapon9, bConfigUseU2Weapon10, bConfigUseU2Weapon11;
var() config bool bConfigUseU2Weapon12;
//var byte bUseU2Weapon[13];
//var class<Weapon> ReplacedWeaponClasses[13];
//var class<WeaponPickup> ReplacedWeaponPickupClasses[13];
//var class<Ammo> ReplacedAmmoPickupClasses[13];
var class<Weapon> U2WeaponClasses[13]; //GE: For default properties ONLY!
//var string U2WeaponPickupClassNames[13];
var string U2AmmoPickupClassNames[13]; //GE: For default properties ONLY!
var byte bIsVehicle[13], bNotVehicle[13]; //GE: For default properties ONLY!
var localized string U2WeaponDisplayText[33], U2WeaponDescText[33];
//var localized string GUISelectOptions[4];
//var config int FirePowerMode;
var config bool bExperimental;
var config bool bUseFieldGenerator;
var config bool bUseProximitySensor;
var config bool bIntegrateShieldReward;
var int IterationNum; //GE: Weapons.Length
const DamageMultiplier=1.818182;
var config int DamagePercentage;
var config bool bUseXMPFeel;
var config string FlashbangModeString;
struct WeaponInfo
{
var class<Weapon> ReplacedWeaponClass; //GE: Generated from ReplacedWeaponClassName. This is what we replace.
//var class<WeaponPickup> ReplacedWeaponPickupClass; //GE: UNUSED?!
var class<Ammo> ReplacedAmmoPickupClass; //GE: Generated from ReplacedWeaponClassName.
var class<Weapon> WeaponClass; //GE: This is the weapon we are going to put inside the world.
var string WeaponPickupClassName; //GE: Generated from WeponClass.
var string AmmoPickupClassName; //GE: Generated from WeaponClass.
var bool bEnabled; //GE: Structs can't be defaultproperty'd, thus we still require bConfigUseU2WeaponX
var bool bIsVehicle; //GE: This indicates that the weapon spawns a vehicle (deployable turrets). These only work in vehicle gametypes, duh.
var bool bNotVehicle; //GE: Opposite of bIsVehicle, that is, only works in non-vehicle gametypes. Think shotgun.
};
var WeaponInfo Weapons[13];
/*
* GE: Here we initialise the mutator. First of all, structs can't use defaultproperties (until UE3) and thus config, so here we need to initialise the structs.
*/
function PostBeginPlay()
{
local int FireMode, x;
//local string ReplacedWeaponPickupClassName;
//IterationNum = ArrayCount(ReplacedWeaponClasses) - int(Level.Game.bAllowVehicles); //GE: He he, neat way to get the required number.
IterationNum = ArrayCount(Weapons);
for (x = 0; x < IterationNum; x++)
{
Weapons[x].bEnabled = bool(GetPropertyText("bConfigUseU2Weapon"$x)); //GE: GetPropertyText() is needed to use variables in an array-like fashion.
//bUseU2Weapon[x] = byte(bool(GetPropertyText("bConfigUseU2Weapon"$x)));
Weapons[x].ReplacedWeaponClass = class<Weapon>(DynamicLoadObject(GetPropertyText("ReplacedWeaponClassNames"$x),class'Class'));
//ReplacedWeaponClasses[x] = class<Weapon>(DynamicLoadObject(GetPropertyText("ReplacedWeaponClassNames"$x),class'Class'));
//ReplacedWeaponPickupClassName = string(ReplacedWeaponClasses[x].default.PickupClass);
for(FireMode = 0; FireMode<2; FireMode++)
{
if( (Weapons[x].ReplacedWeaponClass.default.FireModeClass[FireMode] != None)
&& (Weapons[x].ReplacedWeaponClass.default.FireModeClass[FireMode].default.AmmoClass != None)
&& (Weapons[x].ReplacedWeaponClass.default.FireModeClass[FireMode].default.AmmoClass.default.PickupClass != None) )
{
Weapons[x].ReplacedAmmoPickupClass = class<Ammo>(Weapons[x].ReplacedWeaponClass.default.FireModeClass[FireMode].default.AmmoClass.default.PickupClass);
break;
}
}
Weapons[x].WeaponClass = U2WeaponClasses[x];
Weapons[x].WeaponPickupClassName = string(Weapons[x].WeaponClass.default.PickupClass);
Weapons[x].AmmoPickupClassName = U2AmmoPickupClassNames[x];
Weapons[x].bIsVehicle = bool(bIsVehicle[x]);
Weapons[x].bNotVehicle = bool(bNotVehicle[x]);
}
Super.PostBeginPlay();
}
/*
* GE: Utility function for checking if we can replace the item with the weapon/ammo of choice.
*/
function bool ValidReplacement(int x)
{
if (Level.Game.bAllowVehicles)
return (Weapons[x].bEnabled && !Weapons[x].bNotVehicle );
return (Weapons[x].bEnabled && !Weapons[x].bIsVehicle);
}
/*
* GE: Here we replace things.
*/
function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
{
local int x, i;
local WeaponLocker L;
bSuperRelevant = 0;
if (xWeaponBase(Other) != None)
{
for (x = 0; x < IterationNum; x++)
{
if (ValidReplacement(x) && xWeaponBase(Other).WeaponType == Weapons[x].ReplacedWeaponClass)
{
xWeaponBase(Other).WeaponType = Weapons[x].WeaponClass;
return false;
}
}
return true;
}
if (Weapon(Other) != None)
{
if ( Other.IsA('BallLauncher') )
return true;
for (x = 0; x < IterationNum; x++)
if (ValidReplacement(x) && Other.Class == Weapons[x].ReplacedWeaponClass)
return false;
return true;
}
/*if (WeaponPickup(Other) != None) //GE: This should never happen.
{
for (x = 0; x < IterationNum; x++)
{
if (Weapons[x].bEnabled && Other.Class == Weapons[x].ReplacedWeaponPickupClass)
{
ReplaceWith(Other, U2WeaponPickupClassNames[x]);
return false;
}
}
} */
if (Ammo(Other) != None)
{
for (x = 0; x < IterationNum; x++)
{
if (ValidReplacement(x) && Other.Class == Weapons[x].ReplacedAmmoPickupClass)
{
ReplaceWith(Other, Weapons[x].AmmoPickupClassName);
return false;
}
}
return true;
}
if (WeaponLocker(Other) != None)
{
L = WeaponLocker(Other);
for (x = 0; x < IterationNum; x++)
if (ValidReplacement(x))
for (i = 0; i < L.Weapons.Length; i++)
if (L.Weapons[i].WeaponClass == Weapons[x].ReplacedWeaponClass)
L.Weapons[i].WeaponClass = Weapons[x].WeaponClass;
return true;
}
//STARTING WEAPON
if( xPawn(Other) != None )
xPawn(Other).RequiredEquipment[0] = string(Weapons[1].WeaponClass);
if( xPawn(Other) != None && bUseFieldGenerator == True && Level.Game.bAllowVehicles)
xPawn(Other).RequiredEquipment[2] = "U2Weapons.U2WeaponFieldGenerator";
if( xPawn(Other) != None && bUseProximitySensor == True && Level.Game.bAllowVehicles)
xPawn(Other).RequiredEquipment[3] = "U2Weapons.U2ProximitySensorDeploy";
//GE: Special handling - Shield Reward integration
if (bIntegrateShieldReward && Other.IsA('ShieldReward'))
{
ShieldPack(Other).SetStaticMesh(StaticMesh'XMPWorldItemsM.items.Pickup_TD_001');
ShieldPack(Other).Skins[0] = Shader'U2343T.Pickups.Energy_Pickup_B_FX_01';
ShieldPack(Other).RepSkin = Shader'U2343T.Pickups.Energy_Pickup_B_FX_01';
ShieldPack(Other).SetDrawScale(0.35);
ShieldPack(Other).SetCollisionSize(27.0, 4.0);
ShieldPack(Other).PickupMessage = "You got an Energy Pickup.";
ShieldPack(Other).PickupSound = Sound'U2A.Powerups.EnergyPowerUp';
}
return Super.CheckReplacement(Other,bSuperRelevant);
}
/*
* GE: This is for further replacement, I think...
*/
function string GetInventoryClassOverride(string InventoryClassName)
{
local int x;
for (x = 0; x < IterationNum; x++)
{
if (InventoryClassName ~= string(Weapons[x].ReplacedWeaponClass) && ValidReplacement(x))
return string(Weapons[x].WeaponClass);
}
return Super.GetInventoryClassOverride(InventoryClassName);
}
/*
* GE: Configuration options.
*/
static function FillPlayInfo(PlayInfo PlayInfo)
{
local array<CacheManager.WeaponRecord> Recs;
local string WeaponOptions;
local int i;
Super.FillPlayInfo(PlayInfo);
class'CacheManager'.static.GetWeaponList(Recs);
for (i = 0; i < Recs.Length; i++)
{
if (WeaponOptions != "")
WeaponOptions $= ";";
WeaponOptions $= Recs[i].ClassName $ ";" $ Recs[i].FriendlyName;
}
PlayInfo.AddSetting(default.RulesGroup, "bConfigUseU2Weapon0", default.U2WeaponDisplayText[0], 0, 3, "Check");
PlayInfo.AddSetting(default.RulesGroup, "ReplacedWeaponClassNames0", default.U2WeaponDisplayText[1], 0, 4, "Select", WeaponOptions);
PlayInfo.AddSetting(default.RulesGroup, "bConfigUseU2Weapon1", default.U2WeaponDisplayText[2], 0, 5, "Check");
PlayInfo.AddSetting(default.RulesGroup, "ReplacedWeaponClassNames1", default.U2WeaponDisplayText[3], 0, 6, "Select", WeaponOptions);
PlayInfo.AddSetting(default.RulesGroup, "bConfigUseU2Weapon2", default.U2WeaponDisplayText[6], 0, 7, "Check");
PlayInfo.AddSetting(default.RulesGroup, "ReplacedWeaponClassNames2", default.U2WeaponDisplayText[7], 0, 8, "Select", WeaponOptions);
PlayInfo.AddSetting(default.RulesGroup, "bConfigUseU2Weapon3", default.U2WeaponDisplayText[8], 0, 9, "Check");
PlayInfo.AddSetting(default.RulesGroup, "ReplacedWeaponClassNames3", default.U2WeaponDisplayText[9], 0, 10, "Select", WeaponOptions);
PlayInfo.AddSetting(default.RulesGroup, "bConfigUseU2Weapon4", default.U2WeaponDisplayText[10], 0, 11, "Check");
PlayInfo.AddSetting(default.RulesGroup, "ReplacedWeaponClassNames4", default.U2WeaponDisplayText[11], 0, 12, "Select", WeaponOptions);
PlayInfo.AddSetting(default.RulesGroup, "bConfigUseU2Weapon5", default.U2WeaponDisplayText[12], 0, 13, "Check");
PlayInfo.AddSetting(default.RulesGroup, "ReplacedWeaponClassNames5", default.U2WeaponDisplayText[13], 0, 14, "Select", WeaponOptions);
PlayInfo.AddSetting(default.RulesGroup, "bConfigUseU2Weapon6", default.U2WeaponDisplayText[14], 0, 15, "Check");
PlayInfo.AddSetting(default.RulesGroup, "ReplacedWeaponClassNames6", default.U2WeaponDisplayText[15], 0, 16, "Select", WeaponOptions);
PlayInfo.AddSetting(default.RulesGroup, "bConfigUseU2Weapon7", default.U2WeaponDisplayText[16], 0, 17, "Check");
PlayInfo.AddSetting(default.RulesGroup, "ReplacedWeaponClassNames7", default.U2WeaponDisplayText[17], 0, 18, "Select", WeaponOptions);
PlayInfo.AddSetting(default.RulesGroup, "bConfigUseU2Weapon8", default.U2WeaponDisplayText[18], 0, 19, "Check");
PlayInfo.AddSetting(default.RulesGroup, "ReplacedWeaponClassNames8", default.U2WeaponDisplayText[19], 0, 20, "Select", WeaponOptions);
PlayInfo.AddSetting(default.RulesGroup, "bConfigUseU2Weapon9", default.U2WeaponDisplayText[20], 0, 21, "Check");
PlayInfo.AddSetting(default.RulesGroup, "ReplacedWeaponClassNames9", default.U2WeaponDisplayText[21], 0, 22, "Select", WeaponOptions);
PlayInfo.AddSetting(default.RulesGroup, "bConfigUseU2Weapon10", default.U2WeaponDisplayText[22], 0, 23, "Check");
PlayInfo.AddSetting(default.RulesGroup, "ReplacedWeaponClassNames10", default.U2WeaponDisplayText[23], 0, 24, "Select", WeaponOptions);
PlayInfo.AddSetting(default.RulesGroup, "bConfigUseU2Weapon11", default.U2WeaponDisplayText[24], 0, 25, "Check");
PlayInfo.AddSetting(default.RulesGroup, "ReplacedWeaponClassNames11", default.U2WeaponDisplayText[25], 0, 26, "Select", WeaponOptions);
PlayInfo.AddSetting(default.RulesGroup, "bConfigUseU2Weapon12", default.U2WeaponDisplayText[26], 0, 27, "Check");
PlayInfo.AddSetting(default.RulesGroup, "ReplacedWeaponClassNames12", default.U2WeaponDisplayText[27], 0, 28, "Select", WeaponOptions);
PlayInfo.AddSetting(default.RulesGroup, "bUseXMPFeel", default.U2WeaponDisplayText[4], 0, 29, "Check");
PlayInfo.AddSetting(default.RulesGroup, "DamagePercentage", default.U2WeaponDisplayText[30], 0, 30, "Text", "3;0:100");
PlayInfo.AddSetting(default.RulesGroup, "bExperimental", default.U2WeaponDisplayText[5], 0, 31, "Check");
PlayInfo.AddSetting(default.RulesGroup, "bUseFieldGenerator", default.U2WeaponDisplayText[28], 0, 32, "Check");
PlayInfo.AddSetting(default.RulesGroup, "bUseProximitySensor", default.U2WeaponDisplayText[29], 0, 33, "Check");
PlayInfo.AddSetting(default.RulesGroup, "bIntegrateShieldReward", default.U2WeaponDisplayText[31], 0, 34, "Check");
PlayInfo.AddSetting(default.RulesGroup, "FlashbangModeString", default.U2WeaponDisplayText[32], 0, 35, "Select", "FM_None;None;FM_Directional;Direction-based;FM_DistanceBased;Distance-based");
}
/*
* GE: Configuration tooltips.
*/
static event string GetDescriptionText(string PropName)
{
if (PropName == "bConfigUseU2Weapon0")
return default.U2WeaponDescText[0];
if (PropName == "ReplacedWeaponClassNames0")
return default.U2WeaponDescText[1];
if (PropName == "bConfigUseU2Weapon1")
return default.U2WeaponDescText[2];
if (PropName == "ReplacedWeaponClassNames1")
return default.U2WeaponDescText[3];
if (PropName == "bConfigUseU2Weapon2")
return default.U2WeaponDescText[6];
if (PropName == "ReplacedWeaponClassNames2")
return default.U2WeaponDescText[7];
if (PropName == "bConfigUseU2Weapon3")
return default.U2WeaponDescText[8];
if (PropName == "ReplacedWeaponClassNames3")
return default.U2WeaponDescText[9];
if (PropName == "bConfigUseU2Weapon4")
return default.U2WeaponDescText[10];
if (PropName == "ReplacedWeaponClassNames4")
return default.U2WeaponDescText[11];
if (PropName == "bConfigUseU2Weapon5")
return default.U2WeaponDescText[12];
if (PropName == "ReplacedWeaponClassNames5")
return default.U2WeaponDescText[13];
if (PropName == "bConfigUseU2Weapon6")
return default.U2WeaponDescText[14];
if (PropName == "ReplacedWeaponClassNames6")
return default.U2WeaponDescText[15];
if (PropName == "bConfigUseU2Weapon7")
return default.U2WeaponDescText[16];
if (PropName == "ReplacedWeaponClassNames7")
return default.U2WeaponDescText[17];
if (PropName == "bConfigUseU2Weapon8")
return default.U2WeaponDescText[18];
if (PropName == "ReplacedWeaponClassNames8")
return default.U2WeaponDescText[19];
if (PropName == "bConfigUseU2Weapon9")
return default.U2WeaponDescText[20];
if (PropName == "ReplacedWeaponClassNames9")
return default.U2WeaponDescText[21];
if (PropName == "bConfigUseU2Weapon10")
return default.U2WeaponDescText[22];
if (PropName == "ReplacedWeaponClassNames10")
return default.U2WeaponDescText[23];
if (PropName == "bConfigUseU2Weapon11")
return default.U2WeaponDescText[24];
if (PropName == "ReplacedWeaponClassNames11")
return default.U2WeaponDescText[25];
if (PropName == "bConfigUseU2Weapon12")
return default.U2WeaponDescText[26];
if (PropName == "ReplacedWeaponClassNames12")
return default.U2WeaponDescText[27];
if (PropName == "bUseXMPFeel")
return default.U2WeaponDescText[4];
if (PropName == "bExperimental")
return default.U2WeaponDescText[5];
if (PropName == "bUseFieldGenerator")
return default.U2WeaponDescText[28];
if (PropName == "bUseProximitySensor")
return default.U2WeaponDescText[29];
if (PropName == "DamagePercentage")
return default.U2WeaponDescText[30];
if (PropName == "bIntegrateShieldReward")
return default.U2WeaponDescText[31];
if (PropName == "FlashbangModeString")
return default.U2WeaponDescText[32];
return Super.GetDescriptionText(PropName);
}
/*
* GE: Here we set all the properties for different play styles.
*/
event PreBeginPlay()
{
//local int x;
//local class<Weapon> Weapons;
local float k; //GE: Multiplier.
Super.PreBeginPlay();
k=float(DamagePercentage)/100.0;
//log("MutU2Weapons: k is"@k);
//Sets various settings that match different games
/*if (FirePowerMode == 1) { //Original XMP - use the UTXMP original values
k=1;
}
else */if (!bUseXMPFeel && DamagePercentage != class'MutU2Weapons'.default.DamagePercentage) { //Original U2; compensate for float division errors
Class'U2Weapons.U2AssaultRifleFire'.default.DamageMin *= DamageMultiplier * k;
Class'U2Weapons.U2AssaultRifleFire'.default.DamageMax *= DamageMultiplier * k;
Class'U2Weapons.U2AssaultRifleProjAlt'.default.Damage *= DamageMultiplier * k;
Class'U2Weapons.U2ProjectileASExplAlt'.default.Damage *= DamageMultiplier * k;
Class'U2Weapons.U2ProjectileAltEnergyRifle'.default.Damage *= DamageMultiplier * k;
Class'U2Weapons.U2ProjectileEnergyRifle'.default.Damage *= DamageMultiplier * k;
Class'U2Weapons.U2FireFlameThrower'.default.DamageMin *= DamageMultiplier * k;
Class'U2Weapons.U2FireFlameThrower'.default.DamageMax *= DamageMultiplier * k;
Class'U2Weapons.U2ProjectileFragGrenade'.default.Damage *= DamageMultiplier * k;
Class'U2Weapons.U2ProjectileIncendiaryGrenade'.default.Damage *= DamageMultiplier * k;
Class'U2Weapons.U2ProjectileConcussionGrenade'.default.Damage *= DamageMultiplier * k;
Class'U2Weapons.U2ProjectileRocketDrunken'.default.Damage *= DamageMultiplier * k;
Class'U2Weapons.U2ProjectileRocketSeeking'.default.Damage *= DamageMultiplier * k;
Class'U2Weapons.U2ProjectileRocket'.default.Damage *= DamageMultiplier * k;
Class'U2Weapons.U2ProjectileAltShotgun'.default.Damage *= DamageMultiplier * k;
Class'U2Weapons.U2FireShotgun'.default.DamageMin *= DamageMultiplier * k;
Class'U2Weapons.U2FireShotgun'.default.DamageMax *= DamageMultiplier * k;
Class'U2Weapons.U2FireSniper'.default.DamageMin *= DamageMultiplier * k;
Class'U2Weapons.U2FireSniper'.default.DamageMax *= DamageMultiplier * k;
Class'U2Weapons.U2FirePistol'.default.DamageMin *= DamageMultiplier * k;
Class'U2Weapons.U2FirePistol'.default.DamageMax *= DamageMultiplier * k;
Class'U2Weapons.U2FireAltPistol'.default.DamageMin *= DamageMultiplier * k;
Class'U2Weapons.U2FireAltPistol'.default.DamageMax *= DamageMultiplier * k;
Class'U2Weapons.U2ProjectileEMPGrenade'.default.Damage *= DamageMultiplier * k;
Class'U2Weapons.U2ProjectileToxicGrenade'.default.Damage *= DamageMultiplier * k;
Class'U2Weapons.U2HurterProxy_Gas'.default.myDamage *= DamageMultiplier * k;
Class'U2Weapons.U2HurterProxy_Fire'.default.myDamage *= DamageMultiplier * k;
}
//Dampened U2 is already the default - no need for a rewrite?
else if (bUseXMPFeel) { //General XMP
Class'U2Weapons.U2AssaultRifleFire'.default.Spread = 6.0;
Class'U2Weapons.U2AssaultRifleAmmoInv'.default.MaxAmmo = 300;
Class'U2Weapons.U2AssaultRifleProjAlt'.default.Speed = 5000;
Class'U2Weapons.U2AssaultRifleProjAlt'.default.MomentumTransfer = 8000;
Class'U2Weapons.U2WeaponEnergyRifle'.default.ClipSize = 30;
Class'U2Weapons.U2FireAltEnergyRifle'.default.FireLastReloadTime = 2.265000;
Class'U2Weapons.U2ProjectileAltEnergyRifle'.default.Speed = 1400.000000;
Class'U2Weapons.U2ProjectileAltEnergyRifle'.default.DamageRadius = 290.000000;
Class'U2Weapons.U2ProjectileAltEnergyRifle'.default.LifeSpan = 6.0;
Class'U2Weapons.U2ProjectileEnergyRifle'.default.ShakeRadius = 1024.0;
Class'U2Weapons.U2ProjectileEnergyRifle'.default.ShakeMagnitude = 1.0;
Class'U2Weapons.U2ProjectileEnergyRifle'.default.Speed = 2500.0;
Class'U2Weapons.U2ProjectileEnergyRifle'.default.MaxSpeed = 5000.0;
Class'U2Weapons.U2ProjectileEnergyRifle'.default.LifeSpan = 6.0;
Class'U2Weapons.U2AmmoEnergyRifle'.default.MaxAmmo = 150;
Class'U2Weapons.U2FireAltFlameThrower'.default.FireRate = 0.25;
Class'U2Weapons.U2ProjectileAltFlameThrower'.default.MaxSpeed = 500.0;
Class'U2Weapons.U2ProjectileAltFlameThrower'.default.LifeSpan = 22.0;
Class'U2Weapons.U2ProjectileAltFlameThrower'.default.MomentumTransfer = 500.0;
Class'U2Weapons.U2WeaponFlameThrower'.default.ClipSize = 80;
Class'U2Weapons.U2WeaponFlameThrower'.default.ReloadTime = 2.0;
Class'U2Weapons.U2AmmoFlameThrower'.default.MaxAmmo = 480;
Class'U2Weapons.U2ProjectileFragGrenade'.default.MomentumTransfer = 9000;
Class'U2Weapons.U2ProjectileFragGrenade'.default.MaxSpeed = 2600.0;
Class'U2Weapons.U2ProjectileFragGrenade'.default.Speed = 2600.0;
Class'U2Weapons.U2ProjectileSmokeGrenade'.default.MaxSpeed = 2600.0;
Class'U2Weapons.U2ProjectileSmokeGrenade'.default.Speed = 2600.0;
Class'U2Weapons.U2ProjectileIncendiaryGrenade'.default.DamageRadius = 256.0;
Class'U2Weapons.U2ProjectileIncendiaryGrenade'.default.MomentumTransfer = 9000.0;
Class'U2Weapons.U2ProjectileConcussionGrenade'.default.DamageRadius = 180.0;
Class'U2Weapons.U2FireGrenade'.default.FireRate = 1.33;
Class'U2Weapons.U2WeaponRocketLauncher'.default.ReloadTime = 2.0;
Class'U2Weapons.U2AmmoRocketLauncher'.default.MaxAmmo = 25;
Class'U2Weapons.U2ProjectileRocketDrunken'.default.Speed = 1200.0;
Class'U2Weapons.U2ProjectileRocketSeeking'.default.Speed = 1200.0;
Class'U2Weapons.U2ProjectileRocket'.default.Speed = 2133.0;//3200 is too much
Class'U2Weapons.U2ProjectileRocket'.default.MaxSpeed = 2133.0;
Class'U2Weapons.U2ProjectileRocket'.default.DamageRadius = 384.0;
Class'U2Weapons.U2WeaponShotgun'.default.ReloadTime = 2.21;
Class'U2Weapons.U2WeaponShotgun'.default.ClipSize = 6;
Class'U2Weapons.U2AmmoShotgun'.default.MaxAmmo = 42;
Class'U2Weapons.U2WeaponSniper'.default.ClipSize = 3;
Class'U2Weapons.U2FireSniper'.default.FireRate = 1.0;
Class'U2Weapons.U2AmmoSniper'.default.MaxAmmo = 18;
Class'U2Weapons.U2FirePistol'.default.FireLastReloadTime = 2.4;
Class'U2Weapons.U2FireAltPistol'.default.FireLastReloadTime = 2.4;
Class'U2Weapons.U2AmmoPistol'.default.MaxAmmo = 45;
Class'U2Weapons.U2DamTypePistol'.default.VehicleDamageScaling = 0.30;
Class'U2Weapons.U2DamTypeAltPistol'.default.VehicleDamageScaling = 0.30;
Class'U2Weapons.U2AssaultRifleFire'.default.DamageMin = 20*k;
Class'U2Weapons.U2AssaultRifleFire'.default.DamageMax = 20*k;
Class'U2Weapons.U2AssaultRifleProjAlt'.default.Damage = 175*k;
Class'U2Weapons.U2ProjectileASExplAlt'.default.Damage = 64.0*k;
Class'U2Weapons.U2ProjectileAltEnergyRifle'.default.Damage = 120.0*k;
Class'U2Weapons.U2ProjectileEnergyRifle'.default.Damage = 13.0*k;
Class'U2Weapons.U2FireFlameThrower'.default.DamageMin = 15*k;
Class'U2Weapons.U2FireFlameThrower'.default.DamageMax = 15*k;
Class'U2Weapons.U2ProjectileFragGrenade'.default.Damage = 200.0*k;
Class'U2Weapons.U2ProjectileIncendiaryGrenade'.default.Damage = 50.0*k;
Class'U2Weapons.U2ProjectileConcussionGrenade'.default.Damage = 15.0*k;
Class'U2Weapons.U2ProjectileRocketDrunken'.default.Damage = 70.0*k;
Class'U2Weapons.U2ProjectileRocketSeeking'.default.Damage = 70.0*k;
Class'U2Weapons.U2ProjectileRocket'.default.Damage = 190.0*k;
Class'U2Weapons.U2ProjectileAltShotgun'.default.Damage = 22.0*k;
Class'U2Weapons.U2FireShotgun'.default.DamageMin = 16*k;
Class'U2Weapons.U2FireShotgun'.default.DamageMax = 16*k;
Class'U2Weapons.U2FireSniper'.default.DamageMin = 75*k;
Class'U2Weapons.U2FireSniper'.default.DamageMax = 75*k;
Class'U2Weapons.U2FirePistol'.default.DamageMin = 40*k;
Class'U2Weapons.U2FirePistol'.default.DamageMax = 40*k;
Class'U2Weapons.U2FireAltPistol'.default.DamageMin = 65*k;
Class'U2Weapons.U2FireAltPistol'.default.DamageMax = 65*k;
Class'U2Weapons.U2ProjectileEMPGrenade'.default.Damage = 140.0*k;
Class'U2Weapons.U2ProjectileToxicGrenade'.default.Damage = 100.0*k;
Class'U2Weapons.U2HurterProxy_Gas'.default.myDamage = 30.0*k;
Class'U2Weapons.U2HurterProxy_Fire'.default.myDamage = 80.0*k;
}
//
//-----------------------------------------------------------
//
//Experimental options - lets you Unuse EMPimp projectile and fire from two CAR barrels
if ((bExperimental) && (!bUseXMPFeel)) { //General U2
Class'U2Weapons.U2ProjectileAltEnergyRifle'.default.LifeSpan = 2.0;
Class'U2Weapons.U2ProjectileAltEnergyRifle'.default.Damage = 210.0*k;
}
if (bExperimental) { //CAR - nothing's setting it, FireMode independent
Class'U2Weapons.U2AssaultRifleFire'.default.bModeExclusive = false;
Class'U2Weapons.U2AssaultRifleAltFire'.default.bModeExclusive = false;
}
class'U2ProjectileConcussionGrenade'.static.SetFlashbangMode(FlashbangModeString);
}
defaultproperties
{
ReplacedWeaponClassNames0="XWeapons.Minigun"
ReplacedWeaponClassNames1="XWeapons.AssaultRifle"
ReplacedWeaponClassNames2="XWeapons.BioRifle"
ReplacedWeaponClassNames3="XWeapons.ShockRifle"
ReplacedWeaponClassNames4="Onslaught.ONSGrenadeLauncher"
ReplacedWeaponClassNames5="XWeapons.RocketLauncher"
ReplacedWeaponClassNames6="XWeapons.FlakCannon"
ReplacedWeaponClassNames7="XWeapons.SniperRifle"
ReplacedWeaponClassNames8="UTClassic.ClassicSniperRifle"
ReplacedWeaponClassNames9="Onslaught.ONSMineLayer"
ReplacedWeaponClassNames10="XWeapons.Redeemer"
ReplacedWeaponClassNames11="XWeapons.Painter"
ReplacedWeaponClassNames12="XWeapons.LinkGun"
bConfigUseU2Weapon0=True
bConfigUseU2Weapon1=True
bConfigUseU2Weapon2=True
bConfigUseU2Weapon3=True
bConfigUseU2Weapon4=True
bConfigUseU2Weapon5=True
bConfigUseU2Weapon6=True
bConfigUseU2Weapon7=True
bConfigUseU2Weapon8=True
bConfigUseU2Weapon9=True
bConfigUseU2Weapon10=True
bConfigUseU2Weapon11=True
bConfigUseU2Weapon12=True
bUseFieldGenerator=True
bUseProximitySensor=True
U2WeaponClasses(0)=Class'U2Weapons.U2AssaultRifleInv'
U2WeaponClasses(1)=Class'U2Weapons.U2WeaponEnergyRifle'
U2WeaponClasses(2)=Class'U2Weapons.U2WeaponFlameThrower'
U2WeaponClasses(3)=Class'U2Weapons.U2WeaponPistol'
U2WeaponClasses(4)=Class'U2Weapons.U2AutoTurretDeploy'
U2WeaponClasses(5)=Class'U2Weapons.U2WeaponRocketLauncher'
U2WeaponClasses(6)=Class'U2Weapons.U2WeaponGrenadeLauncher'
U2WeaponClasses(7)=Class'U2Weapons.U2WeaponSniper'
U2WeaponClasses(8)=Class'U2Weapons.U2WeaponSniper'
U2WeaponClasses(9)=Class'U2Weapons.U2WeaponRocketTurret'
U2WeaponClasses(10)=Class'U2Weapons.U2WeaponLandMine'
U2WeaponClasses(11)=Class'U2Weapons.U2WeaponLaserTripMine'
U2WeaponClasses(12)=Class'U2Weapons.U2WeaponShotgun' //GE: Has to be in !Level.Game.bAllowVehicles
bIsVehicle(0)=0
bIsVehicle(1)=0
bIsVehicle(2)=0
bIsVehicle(3)=0
bIsVehicle(4)=1
bIsVehicle(5)=0
bIsVehicle(6)=0
bIsVehicle(7)=0
bIsVehicle(8)=0
bIsVehicle(9)=1
bIsVehicle(10)=1
bIsVehicle(11)=1
bIsVehicle(12)=0
bNotVehicle(12)=1
U2AmmoPickupClassNames(0)="U2Weapons.U2AssaultRifleAmmoPickup"
U2AmmoPickupClassNames(1)="U2Weapons.U2PickupAmmoEnergyRifle"
U2AmmoPickupClassNames(2)="U2Weapons.U2PickupAmmoFlameThrower"
U2AmmoPickupClassNames(3)="U2Weapons.U2PickupAmmoPistol"
U2AmmoPickupClassNames(4)="U2Weapons.U2PickupAutoTurret"
U2AmmoPickupClassNames(5)="U2Weapons.U2PickupAmmoRocket"
U2AmmoPickupClassNames(6)="U2Weapons.U2PickupAmmoGrenade"
U2AmmoPickupClassNames(7)="U2Weapons.U2PickupAmmoSniper"
U2AmmoPickupClassNames(8)="U2Weapons.U2PickupAmmoSniper"
U2AmmoPickupClassNames(9)="U2Weapons.U2PickupRocketTurret"
U2AmmoPickupClassNames(10)="U2Weapons.U2PickupLandMine"
U2AmmoPickupClassNames(11)="U2Weapons.U2PickupLaserTripMine"
U2AmmoPickupClassNames(12)="U2Weapons.U2PickupAmmoShotgun"
U2WeaponDisplayText(0)="Include the Combat Assault Rifle"
U2WeaponDisplayText(1)="Replace this with the M32 Duster CAR"
U2WeaponDisplayText(2)="Include the Shock Lance"
U2WeaponDisplayText(3)="Replace this with the Shock Lance"
U2WeaponDisplayText(4)="Use XMP-style fire power?"
U2WeaponDisplayText(5)="Use alternative options?"
U2WeaponDisplayText(6)="Include the Flamethrower"
U2WeaponDisplayText(7)="Replace this with the Vulcan"
U2WeaponDisplayText(8)="Include the Magnum Pistol"
U2WeaponDisplayText(9)="Replace this with the Magnum Pistol"
U2WeaponDisplayText(10)="Include the Auto Turret"
U2WeaponDisplayText(11)="Replace this with the Auto Turret"
U2WeaponDisplayText(12)="Include the Shark Rocket Launcher"
U2WeaponDisplayText(13)="Replace this with the Shark"
U2WeaponDisplayText(14)="Include the Grenade Launcher"
U2WeaponDisplayText(15)="Replace this with the Hydra"
U2WeaponDisplayText(16)="Include the Widowmaker Sniper (1)"
U2WeaponDisplayText(17)="Replace this with the Widowmaker Rifle"
U2WeaponDisplayText(18)="Include the Widowmaker Sniper (2)"
U2WeaponDisplayText(19)="Replace this with the Widowmaker Rifle too"
U2WeaponDisplayText(20)="Include the Rocket Turret"
U2WeaponDisplayText(21)="Replace this with the Rocket Turret"
U2WeaponDisplayText(22)="Include the Land Mine"
U2WeaponDisplayText(23)="Replace this with the Land Mine"
U2WeaponDisplayText(24)="Include the Laser Trip Mine"
U2WeaponDisplayText(25)="Replace this with the Laser Trip Mine"
U2WeaponDisplayText(26)="Include the Crowd Pleaser Shotgun"
U2WeaponDisplayText(27)="Replace this with the Crowd Pleaser"
U2WeaponDisplayText(28)="Include the Field Generator"
U2WeaponDisplayText(29)="Include the Proximity Sensor"
U2WeaponDisplayText(30)="Firepower damping percentage"
U2WeaponDisplayText(31)="Integrate with Shield Reward"
U2WeaponDisplayText(32)="Concussion grenade behaviour"
U2WeaponDescText(0)="Include the M32 Duster Combat Assault Rifle in the game, i.e. enable it?"
U2WeaponDescText(1)="What weapon should be replaced with the CAR. By default it's the Minigun."
U2WeaponDescText(2)="Enable the Shock Lance Energy Rifle?"
U2WeaponDescText(3)="What weapon should be replaced with the Energy Rifle. By default it's the Assault Rifle. NOTE: Changing this value is not recommended."
U2WeaponDescText(4)="If enabled, this option will make all weapon firepower the same as in Unreal II XMP; if not, the firepower is consistent with Unreal II SP."
U2WeaponDescText(5)="If enabled, will make the Shock Lance use another, limited, secondary fire mode and allow Combat Assault Rifle use Unreal: Return to Na Pali fire style (shooting out of 2 barrels)."
U2WeaponDescText(6)="Enable the Vulcan Flamethrower?"
U2WeaponDescText(7)="What weapon should be replaced with the Flamethrower. By default it's the Bio Rifle."
U2WeaponDescText(8)="Enable the Magnum Pistol?"
U2WeaponDescText(9)="What weapon should be replaced with the Magnum Pistol. By default it's the Shock Rifle."
U2WeaponDescText(10)="Enable the Automatic Turret?"
U2WeaponDescText(11)="What weapon should be replaced with the Auto Turret. By default it's the Onslaught Grenade Launcher."
U2WeaponDescText(12)="Enable the Shark Rocket Launcher?"
U2WeaponDescText(13)="What weapon should be replaced with the Shark Rocket Launcher. By default it's the Rocket Launcher."
U2WeaponDescText(14)="Enable the Hydra Grenade Launcher?"
U2WeaponDescText(15)="What weapon should be replaced with the Hydra Grenade Launcher. By default it's the Flak Cannon."
U2WeaponDescText(16)="Should the Lightning Gun be replaced with the Widowmaker Sniper Rifle?"
U2WeaponDescText(17)="What weapon should be replaced with the Widowmaker Sniper Rifle. By default it's the Lightning Gun here."
U2WeaponDescText(18)="Should the Classic Sniper Rifle be replaced with the Widowmaker Sniper Rifle?"
U2WeaponDescText(19)="What weapon should be replaced with the Widowmaker Sniper Rifle. By default it's the Classic Sniper Rifle here."
U2WeaponDescText(20)="Enable the Rocket Turret delpoyable?"
U2WeaponDescText(21)="What weapon should be replaced with the Rocket Turret deployable. By default it's the Mine Layer."
U2WeaponDescText(22)="Enable the Land Mine?"
U2WeaponDescText(23)="What weapon should be replaced with the Land Mine. By default it's the Redeemer."
U2WeaponDescText(24)="Enable the Laser Trip Mine?"
U2WeaponDescText(25)="What weapon should be replaced with the Laser Trip Mine. By default it's the Ion Painter."
U2WeaponDescText(26)="Enable the Crowd Pleaser Shotgun? It won't replace the Link Gun in matches with vehicles."
U2WeaponDescText(27)="What weapon should be replaced with the Crowd Pleaser Shotgun. By default it's the Link Gun. It does not replace it in vehicle matches."
U2WeaponDescText(28)="Enable the Field Generator? If enabled, you start with one."
U2WeaponDescText(29)="Enable the Proximity Sensor? If enabled, you start with one."
U2WeaponDescText(30)="This number controls how powerful all weapons are. By deafult the firepower is set to 55% of the original in order to compensate for the fact that players in UT2004 don't have shields or damage filtering."
U2WeaponDescText(31)="If checked, the Shield Reward mutator produces Unreal II shield pickups."
U2WeaponDescText(32)="Choose between no white overlay, overlay depending on the player's view (XMP style) and overlay depending on the distance from the player (default, foolproof)."
//FirePowerMode=4
DamagePercentage=55
bUseXMPFeel=False
bIntegrateShieldReward=True
FlashbangModeString="FM_DistanceBased"
GroupName="Arena"
FriendlyName="Unreal II or XMP Weapons"
Description="Add the Unreal II weapons to other gametypes. Fully customisable, you can choose between Unreal II and XMP weapon behaviour."
}

View File

@@ -0,0 +1,10 @@
class US3HelloWorld extends GameInfo;
event InitGame( string Options, out string Error )
{
`log( "Hello, world!" );
}
defaultproperties
{
}