mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2024-11-10 07:11:51 +00:00
Fixed some glowcolor bugs, including me getting EF_RED and EF_BLUE reversed
(tee hee) and people not losing glow after a goalitem is removed. Possible bug with chaplan also fixed.
This commit is contained in:
parent
6170af7519
commit
1c224e61ce
4 changed files with 15 additions and 10 deletions
4
defs.qh
4
defs.qh
|
@ -182,8 +182,8 @@
|
|||
#define EF_DIMLIGHT 8
|
||||
#define EF_FLAG1 16
|
||||
#define EF_FLAG2 32
|
||||
#define EF_RED 64
|
||||
#define EF_BLUE 128
|
||||
#define EF_BLUE 64
|
||||
#define EF_RED 128
|
||||
|
||||
#define EF_ANYGLOW (EF_BRIGHTLIGHT | EF_DIMLIGHT | EF_RED | EF_BLUE)
|
||||
|
||||
|
|
2
jobs.qc
2
jobs.qc
|
@ -368,7 +368,7 @@ void() JobChaplan =
|
|||
//Start playing preacher music, glow and inspire!
|
||||
//sound (self, CHAN_VOICE, "ambience/orff.wav", 0.75, ATTN_NORM);
|
||||
sound (self, CHAN_MUSIC, "ambience/orff.wav", 0.75, ATTN_NORM);
|
||||
self.effects |= EF_BRIGHTLIGHT | EF_GlowColor(self);
|
||||
self.effects |= EF_GlowColor(self);
|
||||
ChaplanInspire();
|
||||
};
|
||||
|
||||
|
|
12
player.qc
12
player.qc
|
@ -1512,14 +1512,14 @@ float(entity e) EF_GlowColor =
|
|||
{
|
||||
if (te.owner == e && (te.goal_activation & TFGI_GLOW))
|
||||
{
|
||||
ret |= EF_DIMLIGHT;
|
||||
|
||||
local float teamno = 0;
|
||||
|
||||
if (te.owned_by == 1)
|
||||
ret |= EF_BLUE;
|
||||
else if (te.owned_by == 2)
|
||||
ret |= EF_RED;
|
||||
else if (!ret)
|
||||
ret = EF_DIMLIGHT;
|
||||
}
|
||||
|
||||
te = find(te, classname, "item_tfgoal");
|
||||
|
@ -1529,8 +1529,10 @@ float(entity e) EF_GlowColor =
|
|||
ret |= EF_BLUE;
|
||||
if (e.invincible_finished)
|
||||
ret |= EF_RED;
|
||||
if ((e.job & (JOB_CHAPLAN | JOB_ACTIVE)) == (JOB_CHAPLAN | JOB_ACTIVE))
|
||||
ret |= EF_BLUE | EF_BRIGHTLIGHT;
|
||||
|
||||
if ((ret & EF_ANYGLOW) != EF_DIMLIGHT)
|
||||
if (ret & (EF_BLUE | EF_RED))
|
||||
ret &= ~EF_DIMLIGHT;
|
||||
|
||||
return ret;
|
||||
|
@ -1546,9 +1548,9 @@ float(entity e) EF_GlowColor =
|
|||
}
|
||||
else if (e.team)
|
||||
{
|
||||
if (e.team == 1)
|
||||
if (e.team_no == 1)
|
||||
return EF_BLUE;
|
||||
else if (e.team == 2)
|
||||
else if (e.team_no == 2)
|
||||
return EF_RED;
|
||||
}
|
||||
|
||||
|
|
|
@ -2926,10 +2926,9 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
|
|||
// Make sure we don't remove an effect another Goal is also supplying
|
||||
|
||||
AP.effects &= ~EF_ANYGLOW;
|
||||
AP.effects |= EF_GlowColor(AP); // This handles other glows
|
||||
|
||||
if (Item.goal_activation & TFGI_ITEMGLOWS)
|
||||
Item.effects = Item.effects | EF_GlowColor(self);
|
||||
Item.effects = Item.effects | EF_GlowColor(Item);
|
||||
|
||||
// Remove the Spy prevention
|
||||
if (!spyoff)
|
||||
|
@ -3018,10 +3017,12 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
|
|||
Item.owner = NIL;
|
||||
dremove(Item);
|
||||
TeamFortress_SetSpeed(AP);
|
||||
AP.effects |= EF_GlowColor(AP);
|
||||
return;
|
||||
}
|
||||
Item.owner = NIL;
|
||||
TeamFortress_SetSpeed(AP);
|
||||
AP.effects |= EF_GlowColor(AP);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3059,6 +3060,7 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
|
|||
|
||||
Item.owner = NIL;
|
||||
TeamFortress_SetSpeed(AP);
|
||||
AP.effects |= EF_GlowColor(AP);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3066,6 +3068,7 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
|
|||
Item.solid = SOLID_NOT;
|
||||
Item.owner = NIL;
|
||||
TeamFortress_SetSpeed(AP);
|
||||
AP.effects |= EF_GlowColor(AP);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue