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);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ extend Class SWWMHandler
|
|||
if ( players[i].itemcount > lastitemcount[i] )
|
||||
{
|
||||
int score = 10*(players[i].itemcount-lastitemcount[i]);
|
||||
if ( (level.total_items == level.found_items) && !allitems )
|
||||
if ( !deathmatch && (level.total_items == level.found_items) && !allitems )
|
||||
{
|
||||
allitems = true;
|
||||
Console.Printf(StringTable.Localize("$SWWM_LASTITEM"),players[i].GetUserName(),500);
|
||||
|
|
@ -125,6 +125,8 @@ extend Class SWWMHandler
|
|||
|
||||
private void OneHundredPercentCheck()
|
||||
{
|
||||
// not in DM
|
||||
if ( !deathmatch ) return;
|
||||
if ( !mapclear && (restartmus > 0) )
|
||||
{
|
||||
restartmus--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue