Fixe a few script errors.

Remove stats tracking for kill confirmed since its not part of iw4.
pull/4/head
efinst0rm 2023-08-21 18:44:29 -05:00
parent 130851fe38
commit df5cfeff65
2 changed files with 12 additions and 19 deletions

View File

@ -1132,15 +1132,17 @@ Callback_PlayerConnect()
{ {
setMatchData( "playerCount", game["clientid"] ); setMatchData( "playerCount", game["clientid"] );
setMatchData( "players", self.clientid, "xuid", self getXuid() ); setMatchData( "players", self.clientid, "xuid", self getXuid() );
/#
if ( ( getDvarInt( "scr_forcerankedmatch" ) && level.teamBased ) || ( isDefined( self.pers["isBot"] ) && level.teamBased ) )
self.sessionteam = maps\mp\gametypes\_menus::getTeamAssignment();
#/
assert( getdvarint( "scr_runlevelandquit" ) == 1 || (level.teamBased && (self.sessionteam == "allies" || self.sessionteam == "axis")) || (!level.teamBased && self.sessionteam == "none" ) );
//assert( (level.teamBased && self.sessionteam == self.team) || (!level.teamBased && self.sessionteam == "none") );
if ( matchMakingGame() && allowTeamChoice() ) if( matchMakingGame() && allowTeamChoice() )
{
/#
if ( ( getDvarInt( "scr_forcerankedmatch" ) && level.teamBased ) || ( isDefined( self.pers["isBot"] ) && level.teamBased ) )
self.sessionteam = maps\mp\gametypes\_menus::getTeamAssignment();
#/
assert( getdvarint( "scr_runlevelandquit" ) == 1 || (level.teamBased && (self.sessionteam == "allies" || self.sessionteam == "axis")) || (!level.teamBased && self.sessionteam == "none" ) );
//assert( (level.teamBased && self.sessionteam == self.team) || (!level.teamBased && self.sessionteam == "none") );
setMatchData( "players", self.clientid, "team", self.sessionteam ); setMatchData( "players", self.clientid, "team", self.sessionteam );
}
} }
if ( !level.teamBased ) if ( !level.teamBased )

View File

@ -261,10 +261,6 @@ onUse( player )
{ {
self.trigger playSound( "mp_killconfirm_tags_deny" ); self.trigger playSound( "mp_killconfirm_tags_deny" );
player incPlayerStat( "killsdenied", 1 );
player incPersStat( "denied", 1 );
player maps\mp\gametypes\_persistence::statSetChild( "round", "denied", player.pers["denied"] );
if ( self.victim == player ) if ( self.victim == player )
{ {
event = "tags_retrieved"; event = "tags_retrieved";
@ -288,10 +284,6 @@ onUse( player )
event = "kill_confirmed"; event = "kill_confirmed";
splash = &"SPLASHES_KILL_CONFIRMED"; splash = &"SPLASHES_KILL_CONFIRMED";
player incPlayerStat( "killsconfirmed", 1 );
player incPersStat( "confirmed", 1 );
player maps\mp\gametypes\_persistence::statSetChild( "round", "confirmed", player.pers["confirmed"] );
// if not us, tell the attacker their kill was confirmed // if not us, tell the attacker their kill was confirmed
if ( self.attacker != player ) if ( self.attacker != player )
self.attacker onPickup( event, splash ); self.attacker onPickup( event, splash );
@ -308,13 +300,13 @@ onUse( player )
} }
onPickup( event, splash, stat ) onPickup( event, splash )
{ {
level endon( "game_ended" ); level endon( "game_ended" );
self endon( "disconnect" ); self endon( "disconnect" );
self thread EventPopup( splash ); self thread EventPopup( splash );
maps\mp\gametypes\_gamescore::givePlayerScore( event, self, undefined, true ); maps\mp\gametypes\_gamescore::givePlayerScore( event, self );
self thread maps\mp\gametypes\_rank::giveRankXP( event ); self thread maps\mp\gametypes\_rank::giveRankXP( event );
} }
@ -334,7 +326,6 @@ resetTags()
} }
bounce() bounce()
{ {
level endon( "game_ended" ); level endon( "game_ended" );