Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion source/server/damage.qc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ float(float current_health_delay, float current_perks) Gamemode_GetHealthRegenDe
#define DMG_SCORE_GRENADE 50 // Death by Grenade.
#define DMG_SCORE_EXPLOSIVE 60 // Death by Explosive Weapon.
#define DMG_SCORE_TESLA 50 // Death by Tesla.
#define DMG_SCORE_FLOPPER 50 // Death by PhD Flopper
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gamemode_Festive_ScoreForDamage will need modified to add support for this type and return 90 points.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood

#define DMG_SCORE_STDDAMAGE 10 // Standard Damage reward.

void() Barrel_Hit;
Expand Down Expand Up @@ -274,6 +275,9 @@ void(entity attacker, float d_style) DieHandler =
case DMG_TYPE_UPPERTORSO:
points_earned = DMG_SCORE_UPPERTORSO;
break;
case DMG_TYPE_FLOPPER:
points_earned = DMG_SCORE_FLOPPER;
break;
default:
if (cvar("developer"))
bprint(PRINT_HIGH, "DieHandler: Received invalid style\n");
Expand Down Expand Up @@ -580,7 +584,7 @@ void(entity inflictor, entity attacker, float damage2, float mindamage, float ra
} else if (inflictor.classname == "player") {
// phd flopper.
final_damage = calculate_proximity_value(mindamage, damage2, inflictor.origin, ent.origin, radius);
damage_style = DMG_TYPE_GRENADE;
damage_style = DMG_TYPE_FLOPPER;
} else {
r = rounds;
multi = 1.07;
Expand Down
1 change: 1 addition & 0 deletions source/server/gamemodes/core.qc
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ void(entity attacker, float death_style) Gamemode_DieHandler =
{
switch(current_gamemode) {
case GAMEMODE_STICKSNSTONES: Gamemode_Sticks_DieHandler(attacker, death_style); break;
case GAMEMODE_GUNGAME: Gamemode_GunGame_DieHandler(attacker, death_style); break;
default: break;
}
};
Expand Down
10 changes: 10 additions & 0 deletions source/server/gamemodes/gun_game.qc
Original file line number Diff line number Diff line change
Expand Up @@ -363,4 +363,14 @@ void(float score_earned) Gamemode_GunGame_PlayerAddScore =
}
}
}
};

void(entity attacker, float death_style) Gamemode_GunGame_DieHandler =
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flopper isn't a guaranteed kill in the later rounds. Do you get points awarded for non-killing PhD damage too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it does not currently. Should it be that way?

{

// possible fix for PHD Flopper giving points toward your weapon
switch(death_style) {
case DMG_TYPE_FLOPPER:
return 0;
}
};
6 changes: 3 additions & 3 deletions source/server/weapons/weapon_core.qc
Original file line number Diff line number Diff line change
Expand Up @@ -1841,8 +1841,8 @@ void() CheckPlayer =
traceline(self.origin, self.origin + (v_up * -40), 0, self);

if (trace_ent.classname == "player") {
DamageHandler(self, trace_ent, 100000, DMG_TYPE_OTHER);
DamageHandler(trace_ent, self, 100000, DMG_TYPE_OTHER);
DamageHandler(self, trace_ent, 100000, DMG_TYPE_FLOPPER);
DamageHandler(trace_ent, self, 100000, DMG_TYPE_FLOPPER);
}
}

Expand Down Expand Up @@ -1874,7 +1874,7 @@ void() CheckPlayer =
float damage = over * 0.68;
if (damage > 98) damage = 98;

DamageHandler (self, other, damage, DMG_TYPE_OTHER);
DamageHandler (self, other, damage, DMG_TYPE_FLOPPER);

if (self.health <= 5)
GiveAchievement(7, self);
Expand Down
1 change: 1 addition & 0 deletions source/shared/shared_defs.qc
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ float map_compatibility_mode;
#define DMG_TYPE_ZOMBIESWIPE 9 // Zombie-inflicted: Any attack on Player
#define DMG_TYPE_ELECTRICTRAP 10 // Trap-inflicted: Electric trap damage
#define DMG_TYPE_OTHER 11 // For use with misc. damage infliction
#define DMG_TYPE_FLOPPER 12 // Player-inflicted: PhD Flopper explosion

//Perk types
#define P_JUG 1
Expand Down
Loading