Deathmatch tweaks and fixes.
This commit is contained in:
parent
37275606e3
commit
e3d2158a0a
5 changed files with 19 additions and 8 deletions
|
|
@ -195,8 +195,8 @@ extend Class SWWMHandler
|
|||
SWWMUtility.MarkAchievement('swwm_achievement_shame',src.player);
|
||||
SWWMUtility.AchievementProgressInc('swwm_progress_mega',1,src.player);
|
||||
}
|
||||
// no credits unless it's a counted kill or marine (that isn't friendly)
|
||||
if ( e.Thing.IsFriend(src) || (!e.Thing.default.bCountKill && !(e.Thing is 'ScriptedMarine')) )
|
||||
// no credits unless it's a counted kill or marine (that isn't friendly) or another player in DM
|
||||
if ( e.Thing.IsFriend(src) || (!e.Thing.default.bCountKill && !(e.Thing is 'ScriptedMarine') && !(deathmatch && e.Thing.player)) )
|
||||
return;
|
||||
int pnum = src.PlayerNumber();
|
||||
if ( level.maptime < (lastkill[pnum]+5*GameTicRate) )
|
||||
|
|
@ -207,6 +207,8 @@ extend Class SWWMHandler
|
|||
lastkill[pnum] = level.maptime;
|
||||
// scoring
|
||||
int score = min(1000,int(ceil(e.Thing.GetSpawnHealth()*.05)*10));
|
||||
// player score is always the same
|
||||
if ( e.Thing.player ) score = 1000;
|
||||
SWWMScoreObj scr = null;
|
||||
if ( src.player == players[consoleplayer] )
|
||||
scr = SWWMScoreObj.Spawn(score,e.Thing.Vec3Offset(0,0,e.Thing.Height/2));
|
||||
|
|
@ -315,7 +317,7 @@ extend Class SWWMHandler
|
|||
}
|
||||
SWWMCredits.Give(src.player,score);
|
||||
if ( scr ) scr.score = score; // update final score
|
||||
if ( (level.killed_monsters+1 == level.total_monsters) && !allkills )
|
||||
if ( !deathmatch && (level.killed_monsters+1 == level.total_monsters) && !allkills )
|
||||
{
|
||||
allkills = true;
|
||||
SWWMCredits.Give(src.player,1000);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue