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

Rework VSH2 forwards into single function grabs #68

Closed assyrianic closed 6 years ago

assyrianic commented 6 years ago

rather than using a forward system, I'll appropriate Cookies.io's system from Boss Fight Fortress (BFF).

BFF's system uses plugin registration and individually getting a function pointer to call.

This would replace the current system of forwards but reduces calling overhead since we're not dealing with forwards of any kind.

assyrianic commented 6 years ago

in consideration with this, I'd have to remove the function hooking system since that will not be necessary.

assyrianic commented 6 years ago

this is something VSH Advanced had used before. Function grabbing was done like...

Function fBossWon = GetFunctionByName(this.hPluginHndl, "VSHA_OnBossWin);
if( fBossWon ) {
    Call_StartFunction(this.hPluginHndl, fBossWon);
    Call_Finish();
}
assyrianic commented 6 years ago

I'll be adding a new BaseBoss property called hPluginHndl which will be for the bosses only. Boss subplugins themselves will be responsible for setting up boss data like sounds, skins, models, and code mechanics.

assyrianic commented 6 years ago

ok, new idea for the way the forwards can be implemented. How about a separate working plugin that calls between vsh2 and a boss subplugin?

assyrianic commented 6 years ago

closing this because the current forwards system is good enough.