+ // right now this hook doesn't make much sense (It's actually useless this way except for minstagib invisibility alpha)
+ // but in the future it's supposed to allow me to do some extra stuff with waypointsprites and invisibility powerup
+ // So bare with me until I can fix a certain bug with ka_ballcarrier_waypointsprite_visible_for_player()
+
+ // also note that this structure makes no sense (Rather there is a better way to do it) the way it's currently applied
+ // again just bare with me as this is for a future feature.
+
+ if(self.ballcarried)
+ {
+ // force the default ballcarrier alpha on the player if they have the ball
+ self.alpha = autocvar_g_keepaway_ballcarrier_alpha;
+ self.exteriorweaponentity.alpha = autocvar_g_keepaway_ballcarrier_alpha;
+
+ if(g_minstagib)
+ {
+ if(olditems & IT_STRENGTH)
+ { // if the player has the ball and they also have the invisibility powerup, apply alpha accordingly
+ self.alpha = g_minstagib_invis_alpha;
+ self.exteriorweaponentity.alpha = g_minstagib_invis_alpha;
+ }
+ }
+ }
+ else if(g_minstagib)
+ {
+ // if we're in minstagib and a noncarrier has invisibility, assure that we apply the invisibility effects normally
+ if(olditems & IT_STRENGTH)
+ {
+ self.alpha = g_minstagib_invis_alpha;
+ self.exteriorweaponentity.alpha = g_minstagib_invis_alpha;
+ }
+ }
+ else
+ {
+ // if we're a normal player with no powerups that edit alpha make sure the alpha is default.
+ // (normal powerups just use EF_ADDITIVE)
+ self.alpha = default_player_alpha;
+ self.exteriorweaponentity.alpha = default_weapon_alpha;
+ }
+
+ return 0;