MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / PlayerScoreAdd

Function PlayerScoreAdd

Descent3/Player.cpp:3865–3881  ·  view source on GitHub ↗

Adds to the player's score & kill total

Source from the content-addressed store, hash-verified

3863
3864// Adds to the player's score & kill total
3865void PlayerScoreAdd(int playernum, int points) {
3866 // Add score
3867 if (points) {
3868
3869 if (points > 0)
3870 Players[playernum].num_kills_level++;
3871 else
3872 Players[playernum].friendly_kills_level++;
3873
3874 if (!(playernum != Player_num || IsCheater)) {
3875 Players[playernum].score += points;
3876
3877 Score_added = points;
3878 Score_added_timer = SCORE_ADDED_TIME;
3879 }
3880 }
3881}
3882
3883////////////////////////////////////////////////////
3884// Thief interface functions

Callers 2

DoDyingFrameFunction · 0.85
KillObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected