Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 |
class VampireGameRules extends GameRules; var() float ConversionRatio; function int NetDamage( int OriginalDamage, int Damage, pawn injured, pawn instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType ) { if ( NextGameRules != None ) return NextGameRules.NetDamage( OriginalDamage,Damage,injured,instigatedBy,HitLocation,Momentum,DamageType ); if ( (InstigatedBy != Injured) && (InstigatedBy != None) && (InstigatedBy.Health > 0) && (InstigatedBy.PlayerReplicationInfo != None) && (Injured.PlayerReplicationInfo != None) && ((InstigatedBy.PlayerReplicationInfo.Team == None) || (InstigatedBy.PlayerReplicationInfo.Team != Injured.PlayerReplicationInfo.Team)) ) InstigatedBy.Health = Min( InstigatedBy.Health+Damage*ConversionRatio, Max(InstigatedBy.Health,InstigatedBy.HealthMax) ); return Damage; } // // server querying // function GetServerDetails( out GameInfo.ServerResponseLine ServerState ) { // append the gamerules name- only used if mutator adds me and deletes itself. local int i; i = ServerState.ServerInfo.Length; ServerState.ServerInfo.Length = i+1; ServerState.ServerInfo[i].Key = "Mutator"; ServerState.ServerInfo[i].Value = GetHumanReadableName(); } defaultproperties { ConversionRatio=0.500000 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |