]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix compile Mario/player_alpha
authorMario <mario.mario@y7mail.com>
Fri, 17 Jul 2020 08:10:24 +0000 (18:10 +1000)
committerMario <mario.mario@y7mail.com>
Fri, 17 Jul 2020 08:10:24 +0000 (18:10 +1000)
qcsrc/common/mutators/mutator/instagib/sv_instagib.qc
qcsrc/server/autocvars.qh
qcsrc/server/client.qc

index 15b6e9d5149284e575903faebaf4f2f4076281b9..945d506dc9f343590b64c40e7729e35392b1db1f 100644 (file)
@@ -227,7 +227,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, SetPlayerAlpha)
 {
        entity player = M_ARGV(0, entity);
 
-       if(time < player.strength_finished)
+       if(time < STAT(STRENGTH_FINISHED, player))
        {
                M_ARGV(1, float) = min(M_ARGV(1, float), autocvar_g_instagib_invis_alpha); // player_alpha
                M_ARGV(2, float) = min(M_ARGV(2, float), autocvar_g_instagib_invis_alpha); // weapon_alpha
index 99077dcfe7b237fc8e1c5e59f888e6d666c4feb5..68c48ac64e22241115afd9ed501c3a9fda513338 100644 (file)
@@ -183,7 +183,7 @@ bool autocvar_g_norecoil;
 float autocvar_g_items_mindist;
 float autocvar_g_items_maxdist;
 int autocvar_g_pickup_items;
-float autocvar_g_player_alpha;
+float autocvar_g_player_alpha = 1;
 float autocvar_g_player_brightness;
 float autocvar_g_player_damageforcescale = 2;
 bool autocvar_g_playerclip_collisions;
index dd3cd633005b9cc510c5a78fc04d50bf317f4765..838b3078a87a9e2cc7aa5b06477b27f2283118da 100644 (file)
@@ -1433,9 +1433,6 @@ void player_powerups(entity this)
 {
        SetPlayerAlpha(this);
 
-       // add a way to see what the items were BEFORE all of these checks for the mutator hook
-       int items_prev = this.items;
-
        if((this.items & IT_USING_JETPACK) && !IS_DEAD(this) && !game_stopped)
                this.modelflags |= MF_ROCKET;
        else