More conc and flash tweaks and fixes

This commit is contained in:
Finny Merrill 2004-04-05 09:53:57 +00:00
parent f8bced16d3
commit 3d50c2b400
2 changed files with 19 additions and 12 deletions

12
defs.qh
View File

@ -829,11 +829,11 @@ float (entity e) EF_GlowColor;
#define GR_CONCUSS_TIME 0.2 // Time between conc timers
#define GR_CONCUSS_DEC 0.5 // Amount of conc to remove each timer
#define GR_CONCUSS_MAX 100 // Highest amount of conc you can get
#define GR_CONCUSS_IDLE 1 // Idlescale amount
#define GR_CONCUSS_X 0.2 // X mult
#define GR_CONCUSS_Y 0.3 // Y mult
#define GR_CONCUSS_KICK 0.05 // Amount of stumbling you do while moving
#define GR_CONCUSS_FIXTIME 3 // Time between sending setangles
#define GR_CONCUSS_IDLE 1 // Idlescale amount with OLD_CONC_GRENADE
#define GR_CONCUSS_X 0.13 // X mult
#define GR_CONCUSS_Y 0.188 // Y mult
#define GR_CONCUSS_KICK 0.032 // Amount of stumbling you do while moving
#define GR_CONCUSS_FIXTIME 0.2 // Time between sending setangles and resetting
#define GR_CONCUSS_BUBBLETIME 3
#define GR_ANTIGRAV_AMOUNT 100
@ -841,6 +841,8 @@ float (entity e) EF_GlowColor;
#define GR_ANTIGRAV_DEC 30
#undef NEW_CONCUSS_BOUNCE // New conc bounce algo (same as regular gren)
#undef GR_CONCUSS_SETANGLE // Laggy visual effect
#undef OLD_CONC_GRENADE
// Defines for the Gas Grenade
#define GR_HALLU_TIME 0.1

View File

@ -108,7 +108,7 @@ void() FlashGrenadeExplode =
if (ft > 0)
te.FlashTime = ft;
stuffcmd (te, "v_cshift 255 255 255 245; wait;wait;wait; bf\n"); // big white flash
stuffcmd (te, "v_cshift 255 255 255 245; bf\n"); // big white flash
}
}
@ -209,8 +209,10 @@ void() ConcussionGrenadeTimer =
if (self.health == 0)
{
sprint (self.owner, PRINT_HIGH, "Your head feels normal again\n");
sprint (self.owner, PRINT_HIGH, "Your head better now\n");
#ifdef OLD_CONC_GRENADE
stuffcmd (self.owner, "v_idlescale 0\n");
#endif
self.owner.mangle = '0 0 0';
self.owner.tfstate &= ~TFSTATE_CONCUSSIONED;
dremove(self);
@ -272,6 +274,9 @@ void() ConcussionGrenadeTimer =
{
local float vel = vlen (self.owner.velocity);
x = random() * amount;
y = amount - x;
if (random() < 0.5)
self.owner.velocity_x += x * GR_CONCUSS_KICK * vel;
else
@ -280,7 +285,7 @@ void() ConcussionGrenadeTimer =
if (random() < 0.5)
self.owner.velocity_y += y * GR_CONCUSS_KICK * vel;
else
self.owner.velocity_y += y * GR_CONCUSS_KICK * vel;
self.owner.velocity_y -= y * GR_CONCUSS_KICK * vel;
}
//sprint (self.owner, PRINT_HIGH, "mangle: " + vtos (self.owner.mangle) + "\n");
@ -724,16 +729,16 @@ void(entity inflictor, entity attacker, float bounce, entity ignore) T_RadiusBou
{
te.health += GR_CONCUSS_AMOUNT;
#ifdef OLD_CONC_GRENADE
stuffcmd(head, "v_idlescale " + ftos (te.health) + "\n");
stuffcmd(head, "v_idlescale " +
ftos (te.health * GR_CONCUSS_IDLE) + "\n");
#endif
te.nextthink = time + GR_CONCUSS_TIME;
}
else
{
#ifdef OLD_CONC_GRENADE
stuffcmd(head,"v_idlescale " + ftos (GR_CONCUSS_AMOUNT) + "\n");
#else
stuffcmd(head,"v_idlescale 10\n");
stuffcmd(head,"v_idlescale " +
ftos (GR_CONCUSS_AMOUNT * GR_CONCUSS_IDLE)+ "\n");
#endif
stuffcmd(head,"bf\n");
// Create a timer entity