| Home Page | Recent Changes | Preferences

Dezro/DMFix

class DMFix extends GameRules;

function PostBeginPlay()
{
    Super.PostBeginPlay();
    
    if (!Level.Game.bAllowVehicles)
        Level.Game.bAllowVehicles = true;
}

function bool PreventDeath(Pawn Killed, Controller Killer, class<DamageType> damageType, vector HitLocation)
{
    local Pawn Driver;

    if ( (NextGameRules != None) && NextGameRules.PreventDeath(Killed,Killer, damageType,HitLocation) )
        return true;

    if ( Vehicle(Killed)!=none && Vehicle(Killed).Driver!=none )
    {
        Driver = Vehicle(Killed).Driver;
        Vehicle(Killed).KDriverLeave(true);
        Driver.TakeDamage( max(999, Driver.Health*2), Killer.Pawn, HitLocation, VRand(), damageType);
    }

    return false;
}

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In