Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Core.Object


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
//=============================================================================
// Object: The base class all objects.
// This is a built-in Unreal class and it shouldn't be modified.
//=============================================================================
class Object
	native
	noexport;

//=============================================================================
// UObject variables.

// Internal variables.
var native private const int ObjectInternal[6];
var native const object Outer;
var native const int ObjectFlags;
var(Object) native const editconst name Name;
var(Object) native const editconst class Class;

//=============================================================================
// Unreal base structures.

//NEW (mdf) -- why are these here if you can't (shouldn't) use them?
/*OLD
// Object flags.
const RF_Transactional	= 0x00000001; // Supports editor undo/redo.
const RF_Public         = 0x00000004; // Can be referenced by external package files.
const RF_Transient      = 0x00004000; // Can't be saved or loaded.
const RF_NotForClient	= 0x00100000; // Don't load for game client.
const RF_NotForServer	= 0x00200000; // Don't load for game server.
const RF_NotForEdit		= 0x00400000; // Don't load for editor.
*/

//NEW (mdf)
// Object flags. 
const RF_NotifyStateChange = 0x00000100; // object should call eventNotifyStateChange prior to executing GotoState or Goto
//OLD

const NoState = '';		// NEW
const NoLabel = '';		// NEW

// A globally unique identifier.
struct Guid
{
	var int A, B, C, D;
};

// A point or direction vector in 3d space.
struct Vector
{
	var() config float X, Y, Z;
};

// A plane definition in 3d space.
struct Plane extends Vector
{
	var() config float W;
};

// An orthogonal rotation in 3d space.
struct Rotator
{
	var() config int Pitch, Yaw, Roll;
};

// An arbitrary coordinate system in 3d space.
struct Coords
{
	var() config vector Origin, XAxis, YAxis, ZAxis;
};

// Used to generate random values between Min and Max
struct Range
{
	var() config float A;
	var() config float B;
};

// Vector of Ranges
struct RangeVector
{
	var() config range X;
	var() config range Y;
	var() config range Z;
};

//NEW
struct NotifyInfo
{
	var const int Target;		/*  UObject*    */
	var const int NotifyFunc;	/*  UFunction*  */
};
//OLD

// A scale and sheering.
struct Scale
{
	var() config vector Scale;
	var() config float SheerRate;
	var() config enum ESheerAxis
	{
		SHEER_None,
		SHEER_XY,
		SHEER_XZ,
		SHEER_YX,
		SHEER_YZ,
		SHEER_ZX,
		SHEER_ZY,
	} SheerAxis;
};

// Camera orientations for Matinee
enum ECamOrientation
{
	CAMORIENT_None,
	CAMORIENT_LookAtActor,
	CAMORIENT_FacePath,
	CAMORIENT_Interpolate,
};

// A color.
struct Color
{
	var() config byte B, G, R, A;
};

// A bounding box.
struct Box
{
	var vector Min, Max;
	var byte IsValid;
};

// A bounding box sphere together.
struct BoundingVolume extends Box
{
	var plane Sphere;
};

// a 4x4 matrix
struct Matrix
{
	var() Plane XPlane;
	var() Plane YPlane;
	var() Plane ZPlane;
	var() Plane WPlane;
};

//NEW
enum EAlignment
{
	ALMT_None,
	ALMT_Left,
	ALMT_Right,
	ALMT_Top,
	ALMT_Bottom,
	ALMT_Center,
	ALMT_HardLeft,
	ALMT_HardRight,
	ALMT_HardTop,
	ALMT_HardBottom,
	ALMT_HardCenter,
};

struct Point
{
	var() public float X;
	var() public float Y;
};

struct Dimension
{
	var() public float Width;
	var() public float Height;
};

struct Rectangle
{
	var() public float X;
	var() public float Y;
	var() public float Width;
	var() public float Height;
};

struct Alignment
{
	var() public EAlignment XAxis;
	var() public EAlignment YAxis;
};

struct ComponentHandle
{
	var const native int buffer;
};

struct ParticleHandle
{
	var const native int buffer;
};
//OLD

//=============================================================================
// Constants.

const MaxInt							= 0x7fffffff;
const MaxFlt							= 3.402823466E38;		//NEW (mdf)
const Pi								= 3.1415926535897932;
const DegreesToRadians					= 0.0174532925199432;	//NEW (mdf) PI / 180.0
const RadiansToDegrees					= 57.295779513082321;	//NEW (mdf) 180.0 / PI
const DegreesToRotationUnits			= 182.044; 				//NEW (mdf) 65536 / 360
const RotationUnitsToDegrees			= 0.00549; 				//NEW (mdf) 360 / 65536

//=============================================================================
// Basic native operators and functions.

//NEW: ComponentHandle validity check.
static final preoperator bool ~(ComponentHandle A){ return A.buffer!=0; }
static final preoperator bool ~(ParticleHandle A){ return A.buffer!=0; }
//OLD

// Bool operators.
native(129) static final preoperator  bool  !  ( bool A );
native(242) static final operator(24) bool  == ( bool A, bool B );
native(243) static final operator(26) bool  != ( bool A, bool B );
native(130) static final operator(30) bool  && ( bool A, skip bool B );
native(131) static final operator(30) bool  ^^ ( bool A, bool B );
native(132) static final operator(32) bool  || ( bool A, skip bool B );

//NEW Additional bool operators.
static final postoperator bool ? ( bool    B ) { return  B; } 
//static final preoperator  bool ! ( bool    B ) { return !B; } 
static final postoperator bool ? ( name    N ) { return N != ''; } 
static final preoperator  bool ! ( name    N ) { return N == ''; } 
static final postoperator bool ? ( int     I ) { return I != 0; } 
static final preoperator  bool ! ( int     I ) { return I == 0; } 
static final postoperator bool ? ( float   F ) { return F != 0; } 
static final preoperator  bool ! ( float   F ) { return F == 0; } 
static final postoperator bool ? ( Object  O ) { return O != none; } 
static final preoperator  bool ! ( Object  O ) { return O == none; } 
static final postoperator bool ? ( string  S ) { return S != ""; } 
static final preoperator  bool ! ( string  S ) { return S == ""; } 
static final postoperator bool ? ( vector  V ) { return V != vect(0,0,0); } 
static final preoperator  bool ! ( vector  V ) { return V == vect(0,0,0); } 
static final postoperator bool ? ( rotator R ) { return R != rot(0,0,0); } 
static final preoperator  bool ! ( rotator R ) { return R == rot(0,0,0); }
//OLD

// Byte operators.
native(133) static final operator(34) byte *= ( out byte A, byte B );
native(134) static final operator(34) byte /= ( out byte A, byte B );
native(135) static final operator(34) byte += ( out byte A, byte B );
native(136) static final operator(34) byte -= ( out byte A, byte B );
native(137) static final preoperator  byte ++ ( out byte A );
native(138) static final preoperator  byte -- ( out byte A );
native(139) static final postoperator byte ++ ( out byte A );
native(140) static final postoperator byte -- ( out byte A );

// Integer operators.
native(141) static final preoperator  int  ~  ( int A );
native(143) static final preoperator  int  -  ( int A );
native(144) static final operator(16) int  *  ( int A, int B );
native(145) static final operator(16) int  /  ( int A, int B );
native(146) static final operator(20) int  +  ( int A, int B );
native(147) static final operator(20) int  -  ( int A, int B );
native(148) static final operator(22) int  << ( int A, int B );
native(149) static final operator(22) int  >> ( int A, int B );
native(196) static final operator(22) int  >>>( int A, int B );
native(150) static final operator(24) bool <  ( int A, int B );
native(151) static final operator(24) bool >  ( int A, int B );
native(152) static final operator(24) bool <= ( int A, int B );
native(153) static final operator(24) bool >= ( int A, int B );
native(154) static final operator(24) bool == ( int A, int B );
native(155) static final operator(26) bool != ( int A, int B );
native(156) static final operator(28) int  &  ( int A, int B );
native(157) static final operator(28) int  ^  ( int A, int B );
native(158) static final operator(28) int  |  ( int A, int B );
native(159) static final operator(34) int  *= ( out int A, float B );
native(160) static final operator(34) int  /= ( out int A, float B );
native(161) static final operator(34) int  += ( out int A, int B );
native(162) static final operator(34) int  -= ( out int A, int B );
native(163) static final preoperator  int  ++ ( out int A );
native(164) static final preoperator  int  -- ( out int A );
native(165) static final postoperator int  ++ ( out int A );
native(166) static final postoperator int  -- ( out int A );

// Integer functions.
native(167) static final Function     int  Rand  ( int Max );				//NEW (mdf) note: returns values in 0..Max-1
native(249) static final function     int  Min   ( int A, int B );
native(250) static final function     int  Max   ( int A, int B );
native(251) static final function     int  Clamp ( int V, int A, int B );

// Float operators.
native(169) static final preoperator  float -  ( float A );
native(170) static final operator(12) float ** ( float A, float B );
native(171) static final operator(16) float *  ( float A, float B );
native(172) static final operator(16) float /  ( float A, float B );
native(173) static final operator(18) float %  ( float A, float B );
native(174) static final operator(20) float +  ( float A, float B );
native(175) static final operator(20) float -  ( float A, float B );
native(176) static final operator(24) bool  <  ( float A, float B );
native(177) static final operator(24) bool  >  ( float A, float B );
native(178) static final operator(24) bool  <= ( float A, float B );
native(179) static final operator(24) bool  >= ( float A, float B );
native(180) static final operator(24) bool  == ( float A, float B );
native(210) static final operator(24) bool  ~= ( float A, float B );
native(181) static final operator(26) bool  != ( float A, float B );
native(182) static final operator(34) float *= ( out float A, float B );
native(183) static final operator(34) float /= ( out float A, float B );
native(184) static final operator(34) float += ( out float A, float B );
native(185) static final operator(34) float -= ( out float A, float B );

// Float functions.
native(186) static final function     float Abs   ( float A );
native(187) static final function     float Sin   ( float A );
native(188) static final function     float Cos   ( float A );
native		static final function     float Asin  ( float A ); //NEW (mdf)
native(812) static final function     float Acos  ( float A );
native(189) static final function     float Tan   ( float A );
native(190) static final function     float Atan  ( float A );
native      static final function     float Atan2 ( float Y, float X );	//NEW
native(191) static final function     float Exp   ( float A );
native(192) static final function     float Loge  ( float A );
native(193) static final function     float Sqrt  ( float A );
native(194) static final function     float Square( float A );
native(195) static final function     float FRand ();								//NEW (mdf) note: returns values in 0.0..1.0
native(244) static final function     float FMin  ( float A, float B );
native(245) static final function     float FMax  ( float A, float B );
native(246) static final function     float FClamp( float V, float A, float B );
native(247) static final function     float Lerp  ( float Alpha, float A, float B );
native(248) static final function     float Smerp ( float Alpha, float A, float B );
            static final function     float Round ( float A ){ return int(A+0.5); }	//NEW


// Vector operators.
native(211) static final preoperator  vector -     ( vector A );
native(212) static final operator(16) vector *     ( vector A, float B );
native(213) static final operator(16) vector *     ( float A, vector B );
native(296) static final operator(16) vector *     ( vector A, vector B );
native(214) static final operator(16) vector /     ( vector A, float B );
native(215) static final operator(20) vector +     ( vector A, vector B );
native(216) static final operator(20) vector -     ( vector A, vector B );
native(275) static final operator(22) vector <<    ( vector A, rotator B );
native(276) static final operator(22) vector >>    ( vector A, rotator B );
native(217) static final operator(24) bool   ==    ( vector A, vector B );
native(218) static final operator(26) bool   !=    ( vector A, vector B );
native(219) static final operator(16) float  Dot   ( vector A, vector B );
native(220) static final operator(16) vector Cross ( vector A, vector B );
native(221) static final operator(34) vector *=    ( out vector A, float B );
native(297) static final operator(34) vector *=    ( out vector A, vector B );
native(222) static final operator(34) vector /=    ( out vector A, float B );
native(223) static final operator(34) vector +=    ( out vector A, vector B );
native(224) static final operator(34) vector -=    ( out vector A, vector B );

// Vector functions.
native(225) static final function float  VSize  ( vector A );
//NEW (mjl)
native(341) static final function float  VSizeSq ( vector A );
//OLD
//NEW (mdf)
native(342)	static final function float  VSize2D ( vector A );
native(343)	static final function float  VSizeSq2D( vector A );
native static final function vector RotateAngleAxis( vector V, vector Axis, INT Angle ); // Axis is assumed to be normalized
//OLD
native(226) static final function vector Normal ( vector A );
native(227) static final function        Invert ( out vector X, out vector Y, out vector Z );
native(252) static final function vector VRand  ( );
native(300) static final function vector MirrorVectorByNormal( vector Vect, vector Normal );
native(253) static final function vector RandomSpreadVector( float SpreadDegrees );	//NEW

// Rotator operators and functions.
native(142) static final operator(24) bool ==     ( rotator A, rotator B );
native(203) static final operator(26) bool !=     ( rotator A, rotator B );
native(287) static final operator(16) rotator *   ( rotator A, float    B );
native(288) static final operator(16) rotator *   ( float    A, rotator B );
native(289) static final operator(16) rotator /   ( rotator A, float    B );
native(290) static final operator(34) rotator *=  ( out rotator A, float B  );
native(291) static final operator(34) rotator /=  ( out rotator A, float B  );
native(316) static final operator(20) rotator +   ( rotator A, rotator B );
native(317) static final operator(20) rotator -   ( rotator A, rotator B );
native(318) static final operator(34) rotator +=  ( out rotator A, rotator B );
native(319) static final operator(34) rotator -=  ( out rotator A, rotator B );
native(229) static final function GetAxes         ( rotator A, out vector X, out vector Y, out vector Z );
native(230) static final function GetUnAxes       ( rotator A, out vector X, out vector Y, out vector Z );
native(320) static final function rotator RotRand ( optional bool bRoll );
native      static final function rotator OrthoRotation( vector X, vector Y, vector Z );
native      static final function rotator Normalize( rotator Rot );

//NEW: Math (Range)
// Range operators.
native(321) static final preoperator  range -     ( range A );
native(322) static final operator(16) range *     ( range A, float B );
native(323) static final operator(16) range *     ( float A, range B );
native(324) static final operator(16) range *     ( range A, range B );
native(340) static final operator(16) range /     ( float A, range B );
native(325) static final operator(16) range /     ( range A, float B );
native(326) static final operator(20) range +     ( range A, range B );
native(327) static final operator(20) range -     ( range A, range B );
native(328) static final operator(24) bool  ==    ( range A, range B );
native(329) static final operator(26) bool  !=    ( range A, range B );
native(330) static final operator(34) range *=    ( out range A, float B );
native(331) static final operator(34) range *=    ( out range A, range B );
native(332) static final operator(34) range /=    ( out range A, float B );
native(333) static final operator(34) range +=    ( out range A, range B );
native(334) static final operator(34) range -=    ( out range A, range B );
native(335) static final operator(10) float @=    ( out float A, range B );

// Range functions.
native(336) static final function float RSize     ( range A );
native(337) static final function float GetRand   ( range A );
native(338) static final function float RMin      ( range A );
native(339) static final function float RMax      ( range A );
//OLD

// String operators.
native(112) static final operator(40) string $  ( coerce string A, coerce string B );
native(168) static final operator(40) string @  ( coerce string A, coerce string B );
native(115) static final operator(24) bool   <  ( string A, string B );
native(116) static final operator(24) bool   >  ( string A, string B );
native(120) static final operator(24) bool   <= ( string A, string B );
native(121) static final operator(24) bool   >= ( string A, string B );
native(122) static final operator(24) bool   == ( string A, string B );
native(123) static final operator(26) bool   != ( string A, string B );
native(124) static final operator(24) bool   ~= ( string A, string B );

// String functions.
native(125) static final function int    Len    ( coerce string S );
native(126) static final function int    InStr  ( coerce string S, coerce string t );
native(127) static final function string Mid    ( coerce string S, int i, optional int j );
native(128) static final function string Left   ( coerce string S, int i );
native(234) static final function string Right  ( coerce string S, int i );
native(235) static final function string Caps   ( coerce string S );
native		static final function string Locs   ( coerce string S );	//NEW: extensions
native(236) static final function string Chr    ( int i );
native(237) static final function int    Asc    ( string S );
native      static final function bool   Split  ( string S, string InS, out string LeftS, out string RightS, optional bool bRight );	//NEW (arl)
native      static final function int    StrArray( string S, string Delim, out array<string> Ar, optional bool bUnique );	//NEW (arl)
static final function string Quotes(string S) { return(Chr(34)$S$Chr(34)); } // NEW: for convenience (UC doesn't seem to handle escaped literal quotation marks)

native static final function float LineLineIntersection( vector P1, vector V1, vector P2, vector P3 ); //NEW (mdf)

// Object operators.
native(114) static final operator(24) bool == ( Object A, Object B );
native(119) static final operator(26) bool != ( Object A, Object B );

// Name operators.
native(254) static final operator(24) bool == ( name A, name B );
native(255) static final operator(26) bool != ( name A, name B );
//NEW: extensions
// Return name corresponding to from name table. If bAdd is true will add to name table if not found.
native static final function name StringToName( string S, optional bool bAdd );
//OLD

//=============================================================================
// General functions.

// Logging.
native(231) final static function Log( coerce string S, optional name Tag );
native(232) final static function Warn( coerce string S );
//NEW: Fix
native static function string Localize( string SectionName, string KeyName, string PackageName, optional bool bOptional );
/*OLD
native static function string Localize( string SectionName, string KeyName, string PackageName );
*/
native static function string GetLanguage();	//NEW: Language

native final static function int FileSize( string Filename );	//NEW (arl)

//NEW (mdf) tracing
native final static function string GetContext( optional byte Level );
native simulated final function TraceMessage( name TraceName, Object ContextObject, coerce string Msg );
//OLD

native static function ObjListMemStats( bool bClear );	//NEW (mib): memory footprint tracking

// Goto state and label.
//NEW (mdf) 
native(113) final function GotoState( name NewState, optional name Label );
native(992) final function GotoLabel( name Label );
/*OLD
native(113) final function GotoState( optional name NewState, optional name Label );
*/
native(281) final function bool IsInState( name TestState ); //NEW (mdf) note: true if in given state or a child state of that state
native(284) final function name GetStateName();

// Objects.
native(258) static final function bool ClassIsChildOf( class TestClass, class ParentClass );
native(303) final function bool IsA( name ClassName );

// Probe messages.
native(117) final function Enable( name ProbeFunc );
native(118) final function Disable( name ProbeFunc );
//NEW (mdf)
native final function bool IsProbing( name ProbeFunc );
	   final function SetProbing( name ProbeFunc, bool bVal ) { if( bVal ) Enable( ProbeFunc ); else Disable( ProbeFunc ); }
//OLD

// Properties.
//NEW (mdf) support getting/setting default property for class
native simulated final function bool CanGetProperty( string PropName ); // returns true if property exists and can be read
native simulated final function bool CanSetProperty( string PropName ); // returns true if property exists and can be set
native simulated final function string GetPropertyText( string PropName, optional bool bDefault );
native simulated final function SetPropertyText( string PropName, string PropValue );
native simulated final function SetPropertyTextDefault( string PropName );
/*OLD
native final function string GetPropertyText( string PropName );
native final function SetPropertyText( string PropName, string PropValue );
*/
native static final function name GetEnum( object E, int i );
native static final function object DynamicLoadObject( string ObjectName, class ObjectClass, optional bool MayFail );
native static final function object FindObject( string ObjectName, class ObjectClass );
native static final function ResetLoaders( object Pkg, bool DynamicOnly, bool ForceLazyLoad );	//NEW

//NEW (arl)
/* 
IMPORTANT -- READ IF YOU ARE USING TIMERS:

NOTE (mdf): You can't override timers in states (the function which was present
in the context in which AddTimer/S was called will always be called). To
"override" timers, make the timer function global then have this call a 
function (which can be overridden). Also, there is no problem with setting up
timers in specific states - you just can't override timers which are "more
global".

NOTE (mdf): any class that uses AddTimer/S needs to take care that all such
timers are removed if/when the object is destroyed (or before then) or the
timer manager could try to call the specified NotifyFunc off of an invalid
object (=crash). The best way to make sure of this is to use RemoveAllTimers 
in an Actor's Destroyed event (use a Cleanup function etc. for non-Actor 
Objects).

NOTE (mdf): timers can't be notified more frequently than the framerate (e.g. 
if the framerate is consistently < 10FPS, a timers aren't going to be getting 
notified more frequently than about every 0.1 seconds. 
*/
native simulated final function bool DefinesFunction( name FuncName );
native simulated final function bool CallFunction( name FuncName, optional Object ReturnObj, optional name ReturnVarName, optional int Index );								// return values are stuffed into ReturnObj.ReturnVarName if specified.
native static final function bool StaticDefinesFunction( Object Obj, name FuncName );
native static final function bool StaticCallFunction( Object Obj, name FuncName, optional Object ReturnObj, optional name ReturnVarName, optional int Index );		// return values are stuffed into ReturnObj.ReturnVarName if specified.
native simulated final function bool DefinesFunctionS( string FuncName );
native simulated final function bool CallFunctionS( string FuncName, optional Object ReturnObj, optional string ReturnVarName, optional int Index );							// return values are stuffed into ReturnObj.ReturnVarName if specified.
native static final function bool StaticDefinesFunctionS( Object Obj, string FuncName );
native static final function bool StaticCallFunctionS( Object Obj, string FuncName, optional Object ReturnObj, optional string ReturnVarName, optional int Index );	// return values are stuffed into ReturnObj.ReturnVarName if specified.
native simulated final function AddTimer( name NotifyFunc, float Frequency, optional bool bRepeat, optional float RandomSpread, optional bool bForceUpdate );
native simulated final function AddTimerS( string NotifyFunc, float Frequency, optional bool bRepeat, optional float RandomSpread, optional bool bForceUpdate );
native simulated final function RemoveTimer( name NotifyFunc );
native simulated final function RemoveTimerS( string NotifyFunc );
native simulated final function RemoveAllTimers();
native simulated final function float TimeRemaining( name NotifyFunc );
native simulated final function float TimeRemainingS( string NotifyFunc );
//OLD

// Configuration.
native(536) final function SaveConfig();
native static final function StaticSaveConfig();
native static final function ResetConfig();

//NEW: DestroyObservers
// Deallocation.
native(1032) final function Delete();	// Should be called on all Objects *before* their Outer is Destroyed.
										// Should only be used on non-Actor subclasses objects.
										// Make sure you set all pointers to the object to None after calling Delete.
//OLD

//NEW MJL
//given a seed, it returns the next seed in the pseudo-random sequence. Has a 2**22 period.
//This is the easiest LCG I could find that had a reliable period and good distribution :)
//Usage:
/*
//to seed our random number generator
Seed = Rand();
log("Random Number 0: "$Seed);
ProgressSeed(Seed);
log("Random Number 1: "$Seed);
ProgressSeed(Seed);
MAXSEED = 2**22;
//must divide the integer by the period (2^22) to get a 0->1 float value
RandomFloat = (Seed/MAXSEED);
log("Random Float: "$RandomFloat);
*/
const MAXSEED = 4194304.0;//2**22;
native static final function ProgressSeed( out int Seed );
//OLD

//NEW
native(1033) static final function float RandRange( float Min, float Max ); // Return a random number within Min..Max-1.
/*OLD
final function float RandRange( float Min, float Max )
{
    return Min + (Max - Min) * FRand();
}
*/

native(1034) static final function float Blend( float A, float B, float Pct );			//NEW
native(1035) static final function float Ablend( float A, float B, float Result );		//NEW

//NEW MJL:
native(1036) static final function float BlendR( Range R, float Pct );
native(1037) static final function float AblendR( Range R, float Result );
//OLD

native(1038) static final function bool FDecision( float Odds ); // NEW (mdf) returns true if 0.0 < FRand() <= Odds

static final function color GetWhiteColor(){ local Color C; C.R=255; C.G=255; C.B=255; C.A=255; return C; }	//NEW

//NEW: CDH... signed mod convenience function
static final function int SMod( int i, int Limit )
{
	assert(Limit > 0);
	if (i >= 0)
		return(i % Limit);
	return( Limit - ((((Limit + (-i)) - 1) % Limit) + 1) );
}
//OLD: CDH... signed mod convenience function

//NEW (arl) (e.g. use EnumStr( enum'ERenderStyle', Style, 4 ) to return "Translucent")
native static final function string EnumStr( Object Type, byte Val, optional int Pre );
//OLD

//=============================================================================
// Engine notification functions.

//NEW: DestroyObservers
//
// Called immediately after New()ed.
//
event Constructed();
//OLD

//
// Called immediately when entering a state, while within
// the GotoState call that caused the state change.
//
event BeginState();

//
// Called immediately before going out of the current state,
// while within the GotoState call that caused the state change.
// 
event EndState();

//NEW (mdf) callbacks for tracking state and/or label changes
native final function name DumpProbes();
native final function AddFlagSafe( int Flag );
native final function RemoveFlagSafe( int Flag );

/*
If object has ObjectFlags & RF_NotifyStateChange (use Add/RemoveFlagsSafe to
control this), script calls to GotoState() and Goto() will result in a call to 
NotifyStateChange with the given information supplied. If the call originated 
from a Goto(), bGoto will be true (note: in this case OldState and NewState 
should never differ). ContextNameStr is the full name for the context (class/
state/function) from which GotoState/Goto was called. If the calling script 
code was compiled with the -lineinfo switch, ContextLineNum will be the line 
from which the GotoState/Goto was called, 0 otherwise.

NotifyStateChange is called *before* the goto or gotostate is executed so 
this is a nice place to log state change information.

Not a probe event -- can't be used with Enable/Disable (these won't work 
across state changes anyway).

Note that there are lots of cases where event is used in Actor functions
which will never be called from the engine (e.g. TakeDamage). IMO, this 
should be flagged as functions, not events.

Also, it might be good to have a keyword (probeevent) to indicate that a 
function is an event function *and* a probe function (one of the up to 64 of
these that can be implemented and enabled/disabled on a per-state basis).
Doing this would pbly mean cleaning up a lot of code though...
*/
event NotifyStateChange( name OldState, name NewState, name Label, bool bGoto, string ContextNameStr, int ContextLineNum );
//OLD

defaultproperties
{
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: sk 3-1-2016 10:38:40.000 - Creation time: sk 3-1-2016 10:48:40.684 - Created with UnCodeX