diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-06-22 14:30:49 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-06-22 14:30:49 +0100 |
commit | 207facbc402f5639cbcd31f079214351ef605cf2 (patch) | |
tree | 4710b2a88dd64f3dfea1609d31a5de9141640951 /Northstar.CustomServers/scripts/vscripts/class/ctitansoul.nut | |
parent | c2d438568df6d98cf731807e30eaa7da31e5ea52 (diff) | |
download | NorthstarMods-207facbc402f5639cbcd31f079214351ef605cf2.tar.gz NorthstarMods-207facbc402f5639cbcd31f079214351ef605cf2.zip |
initial commit after moving to new repo
Diffstat (limited to 'Northstar.CustomServers/scripts/vscripts/class/ctitansoul.nut')
-rw-r--r-- | Northstar.CustomServers/scripts/vscripts/class/ctitansoul.nut | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Northstar.CustomServers/scripts/vscripts/class/ctitansoul.nut b/Northstar.CustomServers/scripts/vscripts/class/ctitansoul.nut new file mode 100644 index 00000000..6f5ddb3e --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/class/ctitansoul.nut @@ -0,0 +1,50 @@ +untyped + +global function CodeCallback_RegisterClass_CTitanSoul + +function CodeCallback_RegisterClass_CTitanSoul() +{ + CTitanSoul.ClassName <- "CTitanSoul" + + // all soul-specific vars should be created here + CTitanSoul.lastAttackInfo <- null + CTitanSoul.hijackProgress <- null + CTitanSoul.lastHijackTime <- null + CTitanSoul.capturable <- null + CTitanSoul.followOnly <- null + CTitanSoul.passives <- null + CTitanSoul.createTime <- null + CTitanSoul.rodeoRiderTracker <- null + CTitanSoul.doomedTime <- null + CTitanSoul.nextRegenTime <- 0.0 + CTitanSoul.nextHealthRegenTime <- 0.0 + CTitanSoul.rodeoReservedSlots <- null + + // the functions below should not change + + function CTitanSoul::constructor() + { + CBaseEntity.constructor() + + this.lastAttackInfo = { time = 0 } + this.passives = arrayofsize( GetNumPassives(), false ) + this.createTime = Time() + this.doomedTime = null + this.rodeoRiderTracker = {} // all players that rode this titan, so they cant get multiple score events + this.capturable = false + this.followOnly = false + this.rodeoReservedSlots = arrayofsize( PROTOTYPE_DEFAULT_TITAN_RODEO_SLOTS, null ) //hardcoded 3 slots for now! + } + + + // function SoulDeath() + function CTitanSoul::SoulDestroy() + { + // transfer the soul away from the last owner + entity titan = expect entity( this.GetTitan() ) + foreach ( func in svGlobal.soulTransferFuncs ) + { + func( expect entity( this ), null, titan ) + } + } +} |