BioTypes and the great refactoring

Discuss and provide feedback on Maps.
Post Reply
User avatar
captainsnarf
Posts: 2631
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

BioTypes and the great refactoring

Post by captainsnarf »

Download here BioTypes_1.0.zip

"Bio is immune to Bio"

This package includes the base types needed to make that happen. Previously everybody was piggybacking off of the CSBadgerFix package to get the bio types.
Includes two vehicle damage types -

DamTypeBioBeam - base class to use for beam type weapon damage types.
DamTypeBioGlobVehicle - base class to use for bio glob damage types.


This also includes a class with a static helper method

Code: Select all

class BioHandler extends Object
    abstract;
static function bool IsBioDamage(class<DamageType> DamageType);
You can use it in your TakeDamage function e.g.

Code: Select all

function TakeDamage(int Damage, Pawn instigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> DamageType)
{

  //don't take damage from bio
  if(class'BioHandler'.static.IsBioDamage(DamageType))
        return;

    Super.TakeDamage(Damage, instigatedBy, Hitlocation, Momentum, damageType);
}
User avatar
pooty
Posts: 4351
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: BioTypes and the great refactoring

Post by pooty »

Very nice. I'll look at getting all the updates on the server later this week.

Might have to do the same for the fire vehicles.. I set those up so that the fire vehicles have resistance to the various fire damage types, but the fire badger (in CSBadgerFix doesn;t unless Snarf put it in) and the fire ant doesn't. Makes me wonder if the Dragon should. This neatly allows us to tailor a few things..and perhaps make some vehicles more vulnerable to fire..
Post Reply