VSH2-Devs / Vs-Saxton-Hale-2

VSH2 is a rewrite of the original VSH, meant to combine the best of VSH and FF2.
https://forums.alliedmods.net/showthread.php?t=286701
50 stars 15 forks source link

Add Native (optional) Goomba Stomp Support #32

Closed Starblaster64 closed 7 years ago

Starblaster64 commented 7 years ago

Would be another event like the current ManageOnBossDealDamage etc.

assyrianic commented 7 years ago

not quite sure this is entirely necessary considering many vsh servers wouldn't be caught dead without goomba since it helps equalize against the boss.

One idea is maybe implement the goomba natively? Add a cvar for it too.

Starblaster64 commented 7 years ago

Isn't that what I put in the title?

assyrianic commented 7 years ago

lel didn't understand it. I say jes

Starblaster64 commented 7 years ago

Should I put the OnStomp event in events.inc or vsh2.sp next to OnTakeDamage? Or in handler.sp with ManageOnBossTake/DealDamage?

I'm thinking about putting it in vsh2.sp, then splitting if off into two seperate events in handler.sp like what you've done with OnTakeDamage.

assyrianic commented 7 years ago

well if it acts similar to a source engine event, probably best to put it in Events; after that, split it into two event functions as OnBossStomped and OnPlayerStomped.

Or we can kill two birds with one stone by directly placing it in handler.sp and have the function parameters coerce to the BaseBoss methodmap.

Starblaster64 commented 7 years ago

The format of it (public Action OnStomp(int attacker, int victim, float& damageMultiplier, float& damageAdd, float& JumpPower)) is more akin to the OnTakeDamage hooks.

Putting it straight into Handler would definitely be simpler though.

assyrianic commented 7 years ago

for handler, easy case.

maybe do something like

BaseBoss boss = BaseBoss(client);
if (boss.bIsBoss) {
   switch (boss.iType) {
        case -1: {} // Ignore if not boss at all.
        case etc.
   }
   return ...;
}
boss = BaseBoss(attacker);
if ( boss.bIsBoss ) {
   switch (boss.iType) {
        case -1: {} // Ignore if not boss at all.
        case etc.
   }
   return ...;
}
assyrianic commented 7 years ago

has this been done in already? I need to revive-bump the VSH2 thread back into the 1st page lol

Starblaster64 commented 7 years ago

Sorry! I've been kind of busy these past few weekends (physically my only time to work on projects currently), and the ones where I wasn't I didn't really have the motivation to be productive. I also have something I'm supposed to finish up this weekend (possible I might have it done soon enough to work on other stuff). If you really need the bump now, you'll have to do it without goomba stomp stuff, or put it in yourself if you have the time.

assyrianic commented 7 years ago

alrighty, is the current source compilable?

Starblaster64 commented 7 years ago

Yes (Travis build log is positive), just hold off for a few hours, I want to double check if I have anything I didn't push on my local repo when I get home this evening (SG Time).

Starblaster64 commented 7 years ago

@assyrianic OK!, Set up the release: https://github.com/Starblaster64/Vs-Saxton-Hale-2/releases/tag/1.3.6 It's 1.3.6 instead of 1.4.0 because there were no really significant changes (e.g Goomba stomp integration).

assyrianic commented 7 years ago

alliedmodders post updated B)

assyrianic commented 7 years ago

any part of the API changed to where the Wiki needs updating?

Starblaster64 commented 7 years ago

Right then, finally got around to working on this, just gonna clean it up then I'll push it to a separate branch before merging. The API will (maybe) need a pretty small update with regards on how to add custom Goomba Stomp behaviour to new/existing Bosses once I push it. It's pretty much identical to how you'd do it with OnTakeDamage anyway.

assyrianic commented 7 years ago

excellent, update the API ref as u need!