mirror of
https://github.com/nzp-team/quakec.git
synced 2025-03-22 02:42:15 +00:00
SERVER: Stop halfing all Juggernog damage, set Player Health appropriately instead
This commit is contained in:
parent
f97e82828b
commit
a0b89faa22
3 changed files with 12 additions and 5 deletions
|
@ -241,6 +241,9 @@ void() GetDown =
|
|||
self.currentmagbk = self.currentmag;
|
||||
self.currentmagbk2 = self.currentmag2;
|
||||
|
||||
// Reset Juggernog health
|
||||
self.max_health = self.health = PLAYER_START_HEALTH;
|
||||
|
||||
if(Util_PlayerHasWeapon(self, W_BIATCH, false) ||
|
||||
Util_PlayerHasWeapon(self, W_RAY, true) ||
|
||||
Util_PlayerHasWeapon(self, W_357, true)) {
|
||||
|
@ -477,9 +480,6 @@ void(entity victim,entity attacker, float damage, float d_style) DamageHandler =
|
|||
// Abstinence Program
|
||||
victim.ach_tracker_abst = 1;
|
||||
|
||||
if (victim.perks & P_JUG)
|
||||
damage = ceil(damage*0.5);
|
||||
|
||||
victim.health = victim.health - damage;
|
||||
victim.health_delay = time + 2;
|
||||
|
||||
|
|
|
@ -49,12 +49,14 @@ void() mystery_touch;
|
|||
#define PERK_SPAWNFLAG_LIMELIGHT 256
|
||||
#define PERK_SPAWNFLAG_YELLOWLIGHT 512
|
||||
|
||||
#define PERK_JUGGERNOG_HEALTH 160
|
||||
|
||||
//
|
||||
// GivePerk(p)
|
||||
// Restores View Model and tells the Client to draw the Perk.
|
||||
//
|
||||
void GivePerk(optional float p) {
|
||||
local float perk;
|
||||
float perk;
|
||||
|
||||
// First of, check if our Client is holding anything, this holds
|
||||
// priority to prevent interruption.
|
||||
|
@ -83,6 +85,9 @@ void GivePerk(optional float p) {
|
|||
break;
|
||||
case P_JUG:
|
||||
self.perks = self.perks | 1;
|
||||
|
||||
// Instant re-gen, set health to Jugg health.
|
||||
self.health = self.max_health = PERK_JUGGERNOG_HEALTH;
|
||||
break;
|
||||
case P_STAMIN:
|
||||
self.perks = self.perks | 32;
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
void(entity e) Light_None;
|
||||
|
||||
#define PLAYER_START_HEALTH 100
|
||||
|
||||
//
|
||||
// Player 3rd Person Animations
|
||||
//
|
||||
|
@ -529,7 +531,7 @@ void() PlayerSpawn =
|
|||
|
||||
setmodel(self, "models/player.mdl");
|
||||
self.movetype = MOVETYPE_WALK;
|
||||
self.max_health = self.health = 100;
|
||||
self.max_health = self.health = PLAYER_START_HEALTH;
|
||||
|
||||
entity who = find(world,classname,"player");
|
||||
while(who != self && !self.playernum)
|
||||
|
|
Loading…
Reference in a new issue