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

DruidsRPGcvs.KnockbackInv


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
class KnockbackInv extends Inventory;

var Pawn PawnOwner;
var int Modifier;

function GiveTo(Pawn Other, optional Pickup Pickup)
{
    PawnOwner = Other;

    if(PawnOwner == None)
    {
        destroy();
        return;
    }

    SetTimer(1/Modifier, true);
    Super.GiveTo(Other);
}

function Destroyed()
{
    if(PawnOwner == None)
        return;

    if(PawnOwner.Physics != PHYS_Walking && PawnOwner.Physics != PHYS_Falling) //still going?
        PawnOwner.setPhysics(PHYS_Falling);
    super.destroyed();
}

function Timer()
{
    local DruidGhostInv dgInv;
    local GhostInv gInv;

    //if ghost is running destroying this is a really bad thing. let the timer tick till they're done.
    dgInv = DruidGhostInv(PawnOwner.FindInventoryType(class'DruidGhostInv'));
    if(dgInv != None && !dgInv.bDisabled)
        return;

    gInv = GhostInv(PawnOwner.FindInventoryType(class'GhostInv'));
    if(gInv != None && !gInv.bDisabled)
        return;

    if(PawnOwner.Physics != PHYS_Hovering && PawnOwner.Physics != PHYS_Falling)
        Destroy();
}

defaultproperties
{
     RemoteRole=ROLE_SimulatedProxy
     bOnlyRelevantToOwner=False
     bAlwaysRelevant=True
     bReplicateInstigator=True
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Mon 10/7/2006 04:02:14.000 - Creation time: Wed 7/2/2007 19:16:42.906 - Created with UnCodeX