Browse Source

Merge pull request #1503 from AJenbo/AddPlrExperience

Add the e variable to AddPlrMonstExper
pull/256/head
Robin Eklind 7 years ago committed by GitHub
parent
commit
e7601dda8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      Source/player.cpp

6
Source/player.cpp

@ -808,7 +808,7 @@ void AddPlrExperience(int pnum, int lvl, int exp)
void AddPlrMonstExper(int lvl, int exp, char pmask) void AddPlrMonstExper(int lvl, int exp, char pmask)
{ {
int totplrs, i; int totplrs, i, e;
totplrs = 0; totplrs = 0;
for (i = 0; i < MAX_PLRS; i++) { for (i = 0; i < MAX_PLRS; i++) {
@ -818,9 +818,9 @@ void AddPlrMonstExper(int lvl, int exp, char pmask)
} }
if (totplrs) { if (totplrs) {
exp = exp / totplrs; e = exp / totplrs;
if (pmask & (1 << myplr)) if (pmask & (1 << myplr))
AddPlrExperience(myplr, lvl, exp); AddPlrExperience(myplr, lvl, e);
} }
} }

Loading…
Cancel
Save