- Your plugin wont work on late load due to custom files not being precached. Your OnMapStart callback wont be called on late load.
- The for loop in OnPluginStart is what I assume you used for late load of the plugin, however it is redundant if it is not a late load. No one should be connected when the plugins are being loaded on normal map start. Should be wrapped in an if statement.
- On that map they use Skeleton King which does 100 dmg per hit not an instant kill. Even in your video it seems OP. There should be at least a cvar for that.
- No OnClientDisconnect for cleanup. Your global bools will be set to true even if the player is not even present, if they disconnect while they are the boss. Currently it does not seem to have any negative effects in the code but if you add something later on, this can be an annoying bug.
- Instead of a timer with 0.0 duration, you can use RequestFrame()
- If you're already using weapon attributes, why not use one for hp? Could be your preference, just asking. With attributes, there would be no overheal. They would be able to pick up health kits though, unless blocked.
- To change a team without killing the player, you can do:
Code:
SetEntProp(iClient, Prop_Send, "m_lifeState", 2);
ChangeClientTeam(iClient, 0);
SetEntProp(iClient, Prop_Send, "m_lifeState", 0);
Dont need an SDK call, unless you want it for a specific reason that I dont see.
- damage = damage * 20; can be written as
- A strange decision to precache sounds in a sound hook. I get that its easier but you emit sounds before they are precached(unless tf2 precaches mvm sounds even in non-mvm modes) and you keep using PrecacheSound on every sound for the boss. I assume that there is a check inside PrecacheSound but its gonna be called 1000s of times for no reason.
- sm_betoastmaster cant be toggled/turned off. Can only die/commit suicide to get rid of it.
- stock is for functions in include files. The compiler wont yell at you for not using the function anywhere and it wont be compiled into the plugin but it will stay in the source code. Its a bad habit to copy them with the function body.
__________________