From a5a5c08882be95427bbc11facb14320377bcaca0 Mon Sep 17 00:00:00 2001 From: x3Karma Date: Mon, 3 Jan 2022 17:30:09 +0800 Subject: adds hidden and OITC localisation --- .../northstar_client_localisation_english.txt | Bin 19944 -> 10737 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt index b7a4c758e..4cb793541 100644 Binary files a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt and b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt differ -- cgit v1.2.3 From aa01f0a17ec8ef8312ec58c9c96f6680c2cf648b Mon Sep 17 00:00:00 2001 From: x3Karma Date: Mon, 3 Jan 2022 17:31:03 +0800 Subject: adds OITC and Hidden gamemodes --- .../vscripts/gamemodes/_gamemode_chamber.nut | 100 +++++++++++ .../vscripts/gamemodes/_gamemode_hidden.nut | 195 +++++++++++++++++++++ .../vscripts/gamemodes/cl_gamemode_chamber.nut | 26 +++ .../vscripts/gamemodes/cl_gamemode_hidden.nut | 60 +++++++ .../vscripts/gamemodes/sh_gamemode_chamber.nut | 41 +++++ .../vscripts/gamemodes/sh_gamemode_hidden.nut | 44 +++++ 6 files changed, 466 insertions(+) create mode 100644 Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut create mode 100644 Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hidden.nut create mode 100644 Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_chamber.nut create mode 100644 Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_hidden.nut create mode 100644 Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_chamber.nut create mode 100644 Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hidden.nut diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut new file mode 100644 index 000000000..4ee47aafc --- /dev/null +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut @@ -0,0 +1,100 @@ +global function GamemodeChamber_Init + +struct { + +} file + +void function GamemodeChamber_Init() +{ + SetSpawnpointGamemodeOverride( FFA ) + + SetShouldUseRoundWinningKillReplay( true ) + SetLoadoutGracePeriodEnabled( false ) // prevent modifying loadouts with grace period + SetWeaponDropsEnabled( false ) + Riff_ForceTitanAvailability( eTitanAvailability.Never ) + Riff_ForceBoostAvailability( eBoostAvailability.Disabled ) + ClassicMP_ForceDisableEpilogue( true ) + + AddCallback_OnClientConnected( ChamberInitPlayer ) + AddCallback_OnPlayerKilled( ChamberOnPlayerKilled ) + AddCallback_OnPlayerRespawned( UpdateLoadout ) + +} + +void function ChamberInitPlayer( entity player ) +{ + UpdateLoadout( player ) +} + +void function ChamberOnPlayerKilled( entity victim, entity attacker, var damageInfo ) +{ + if ( !victim.IsPlayer() || GetGameState() != eGameState.Playing || attacker == victim) + return + + if ( attacker.IsPlayer() ) + { + attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 ) + AddTeamScore( attacker.GetTeam(), 1 ) + if ( DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.human_execution ) + { + string message = victim.GetPlayerName() + " got executed." + foreach ( entity player in GetPlayerArray() ) + SendHudMessage( player, message, -1, 0.4, 255, 0, 0, 0, 0, 3, 0.15 ) + + foreach ( entity weapon in attacker.GetMainWeapons() ) + { + weapon.SetWeaponPrimaryAmmoCount(0) + int clip = weapon.GetWeaponPrimaryClipCount() + 4 + if (weapon.GetWeaponPrimaryClipCountMax() < clip) + weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCountMax()) + else + weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCount() + 4) + } + } else + { + foreach ( entity weapon in attacker.GetMainWeapons() ) + { + weapon.SetWeaponPrimaryAmmoCount(0) + int clip = weapon.GetWeaponPrimaryClipCount() + 1 + if (weapon.GetWeaponPrimaryClipCountMax() < clip) + weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCountMax()) + else + weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCount() + 1) + } + } + SetRoundWinningKillReplayAttacker(attacker) + } +} + +void function UpdateLoadout( entity player ) +{ + // set health to 1 to allow one shot kills + if (IsAlive(player) && player != null) + { + + // set loadout + foreach ( entity weapon in player.GetMainWeapons() ) + player.TakeWeaponNow( weapon.GetWeaponClassName() ) + + foreach ( entity weapon in player.GetOffhandWeapons() ) + player.TakeWeaponNow( weapon.GetWeaponClassName() ) + + array mods = ["one_in_the_chamber"] + player.GiveWeapon( "mp_weapon_wingman", mods) + player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE ) + + thread SetAmmo( player ) + } +} + +void function SetAmmo( entity player ) +{ + foreach ( entity weapon in player.GetMainWeapons() ) + { + weapon.SetWeaponPrimaryAmmoCount(0) + weapon.SetWeaponPrimaryClipCount(1) + } + WaitFrame() + if ( IsValid( player ) ) + PlayerEarnMeter_SetMode( player, eEarnMeterMode.DISABLED ) +} diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hidden.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hidden.nut new file mode 100644 index 000000000..6043ab355 --- /dev/null +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hidden.nut @@ -0,0 +1,195 @@ +global function GamemodeHidden_Init + + +void function GamemodeHidden_Init() +{ + SetShouldUseRoundWinningKillReplay( true ) + SetLoadoutGracePeriodEnabled( false ) // prevent modifying loadouts with grace period + SetWeaponDropsEnabled( false ) + SetRespawnsEnabled( false ) + Riff_ForceTitanAvailability( eTitanAvailability.Never ) + Riff_ForceBoostAvailability( eBoostAvailability.Disabled ) + Riff_ForceSetEliminationMode( eEliminationMode.Pilots ) + + ClassicMP_SetCustomIntro( ClassicMP_DefaultNoIntro_Setup, ClassicMP_DefaultNoIntro_GetLength() ) + ClassicMP_ForceDisableEpilogue( true ) + + AddCallback_OnClientConnected( HiddenInitPlayer ) + AddCallback_OnPlayerKilled( HiddenOnPlayerKilled ) + AddCallback_GameStateEnter( eGameState.Playing, SelectFirstHidden ) + AddCallback_GameStateEnter( eGameState.Postmatch, RemoveHidden ) + SetTimeoutWinnerDecisionFunc( TimeoutCheckSurvivors ) + + thread PredatorMain() + +} + +void function HiddenInitPlayer( entity player ) +{ + SetTeam( player, TEAM_MILITIA ) +} + +void function SelectFirstHidden() +{ + thread SelectFirstHiddenDelayed() +} + +void function SelectFirstHiddenDelayed() +{ + wait 10.0 + RandomFloat( 5.0 ) + + array players = GetPlayerArray() + entity hidden = players[ RandomInt( players.len() ) ] + + if (hidden != null || IsAlive(hidden)) + MakePlayerHidden( hidden ) // randomly selected player becomes hidden + + foreach ( entity otherPlayer in GetPlayerArray() ) + if ( hidden != otherPlayer ) + Remote_CallFunction_NonReplay( otherPlayer, "ServerCallback_AnnounceHidden", hidden.GetEncodedEHandle() ) + + PlayMusicToAll( eMusicPieceID.GAMEMODE_1 ) + + thread UpdateSurvivorsLoadout() +} + +void function UpdateSurvivorsLoadout() +{ + foreach (entity player in GetPlayerArray()) + { + if (player.GetTeam() != TEAM_MILITIA || !IsAlive(player) || player == null) + continue; + + foreach ( entity weapon in player.GetOffhandWeapons() ) + player.TakeWeaponNow( weapon.GetWeaponClassName() ) + + try { + player.GiveOffhandWeapon("mp_ability_cloak", OFFHAND_SPECIAL ) + player.GiveOffhandWeapon("mp_weapon_grenade_emp", OFFHAND_ORDNANCE ) + player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE ) + } catch (ex) {} + } +} + +void function MakePlayerHidden(entity player) +{ + if (player == null) + return; + + SetTeam( player, TEAM_IMC ) + player.SetPlayerGameStat( PGS_ASSAULT_SCORE, 0 ) // reset kills + RespawnHidden( player ) + Remote_CallFunction_NonReplay( player, "ServerCallback_YouAreHidden" ) +} + +void function RespawnHidden(entity player) +{ + if (player.GetTeam() != TEAM_IMC ) + return + + // scale health of the hidden, with 50 as base health + player.SetMaxHealth( 80 + ( (GetPlayerArrayOfTeam( TEAM_MILITIA ).len() + 1 ) * 20) ) + player.SetHealth( 80 + ( (GetPlayerArrayOfTeam( TEAM_MILITIA ).len() + 1 ) * 20) ) + + if ( !player.IsMechanical() ) + player.SetBodygroup( player.FindBodyGroup( "head" ), 1 ) + + // set loadout + foreach ( entity weapon in player.GetMainWeapons() ) + player.TakeWeaponNow( weapon.GetWeaponClassName() ) + + foreach ( entity weapon in player.GetOffhandWeapons() ) + player.TakeWeaponNow( weapon.GetWeaponClassName() ) + + player.GiveWeapon("mp_weapon_wingman_n") + player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE ) + player.GiveOffhandWeapon( "mp_weapon_grenade_sonar", OFFHAND_SPECIAL ); + thread UpdateLoadout(player) + thread GiveArcGrenade(player) +} + +void function GiveArcGrenade(entity player) +{ + wait 45.0 + if (IsAlive(player) || player != null) + player.GiveOffhandWeapon( "mp_weapon_grenade_emp", OFFHAND_ORDNANCE ); +} + +void function HiddenOnPlayerKilled( entity victim, entity attacker, var damageInfo ) +{ + if ( !victim.IsPlayer() || GetGameState() != eGameState.Playing ) + return + + if ( attacker.IsPlayer() ) + { + // increase kills by 1 + attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 ) + } + + +} + +void function UpdateLoadout( entity player ) +{ + string p2016 = "mp_weapon_wingman_n" + foreach ( entity weapon in player.GetMainWeapons() ) + { + if (weapon.GetWeaponClassName() == p2016) + { + weapon.SetWeaponPrimaryAmmoCount(0) + weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCountMax()) + } + } + WaitFrame() + if ( IsValid( player ) ) + PlayerEarnMeter_SetMode( player, eEarnMeterMode.DISABLED ) +} + +void function RemoveHidden() +{ + foreach (entity player in GetPlayerArray()) + { + if (player.GetTeam() == TEAM_IMC && player != null) + player.kv.VisibilityFlags = ENTITY_VISIBLE_TO_EVERYONE + } +} + +void function PredatorMain() +{ + while (true) { + WaitFrame() + if(!IsLobby()) + { + foreach (entity player in GetPlayerArray()) + { + if (player == null || !IsValid(player) || !IsAlive(player) || player.GetTeam() != TEAM_IMC) + continue + vector playerVelV = player.GetVelocity() + float playerVel + playerVel = sqrt(playerVelV.x * playerVelV.x + playerVelV.y * playerVelV.y + playerVelV.z * playerVelV.z) + float playerVelNormal = playerVel * 0.068544 + if (playerVel/300 < 1.3) + { + player.SetCloakFlicker(0, 0) + player.kv.VisibilityFlags = 0 + } + else + { + player.SetCloakFlicker(0.2 , 1 ) + player.kv.VisibilityFlags = 0 + float waittime = RandomFloat(0.5) + wait waittime + player.kv.VisibilityFlags = ENTITY_VISIBLE_TO_EVERYONE + } + } + } + } +} + +int function TimeoutCheckSurvivors() +{ + if ( GetPlayerArrayOfTeam( TEAM_MILITIA ).len() > 0 ) + return TEAM_IMC + + return TEAM_MILITIA +} diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_chamber.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_chamber.nut new file mode 100644 index 000000000..37b0acd33 --- /dev/null +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_chamber.nut @@ -0,0 +1,26 @@ +global function ClGamemodeChamber_Init + +void function ClGamemodeChamber_Init() +{ + // add ffa gamestate asset + ClGameState_RegisterGameStateAsset( $"ui/gamestate_info_ffa.rpak" ) + + // add music for mode, this is copied directly from the ffa/fra music registered in cl_music.gnut + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_INTRO, "music_mp_freeagents_intro", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_INTRO, "music_mp_freeagents_intro", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_WIN, "music_mp_freeagents_outro_win", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_WIN, "music_mp_freeagents_outro_win", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_DRAW, "music_mp_freeagents_outro_lose", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_DRAW, "music_mp_freeagents_outro_lose", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LOSS, "music_mp_freeagents_outro_lose", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LOSS, "music_mp_freeagents_outro_lose", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_THREE_MINUTE, "music_mp_freeagents_almostdone", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_THREE_MINUTE, "music_mp_freeagents_almostdone", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_freeagents_lastminute", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_freeagents_lastminute", TEAM_MILITIA ) +} \ No newline at end of file diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_hidden.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_hidden.nut new file mode 100644 index 000000000..e0f2bfeba --- /dev/null +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_hidden.nut @@ -0,0 +1,60 @@ +global function ClGamemodeHidden_Init +global function ServerCallback_YouAreHidden +global function ServerCallback_AnnounceHidden + +void function ClGamemodeHidden_Init() +{ + // add ffa gamestate asset + // ClGameState_RegisterGameStateAsset( $"ui/gamestate_info_ffa.rpak" ) + + // add music for mode, this is copied directly from the ffa/fra music registered in cl_music.gnut + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_INTRO, "music_mp_freeagents_intro", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_INTRO, "music_mp_freeagents_intro", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_WIN, "music_mp_freeagents_outro_win", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_WIN, "music_mp_freeagents_outro_win", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_DRAW, "music_mp_freeagents_outro_lose", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_DRAW, "music_mp_freeagents_outro_lose", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LOSS, "music_mp_freeagents_outro_lose", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LOSS, "music_mp_freeagents_outro_lose", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_THREE_MINUTE, "music_mp_freeagents_almostdone", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_THREE_MINUTE, "music_mp_freeagents_almostdone", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_freeagents_lastminute", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_freeagents_lastminute", TEAM_MILITIA ) +} + +void function ServerCallback_YouAreHidden() +{ + // heavily based on mfd code + entity localPlayer = GetLocalViewPlayer() + + StartParticleEffectOnEntity( localPlayer.GetCockpit(), GetParticleSystemIndex( $"P_MFD" ), FX_PATTACH_ABSORIGIN_FOLLOW, -1 ) + EmitSoundOnEntity( localPlayer, "UI_InGame_MarkedForDeath_PlayerMarked" ) + HideEventNotification() + AnnouncementData announcement = Announcement_Create( "#HIDDEN_YOU_ARE_HIDDEN" ) + Announcement_SetSubText( announcement, "#HIDDEN_KILL_SURVIVORS" ) + Announcement_SetTitleColor( announcement, <1,0,0> ) + Announcement_SetPurge( announcement, true ) + Announcement_SetPriority( announcement, 200 ) //Be higher priority than Titanfall ready indicator etc + Announcement_SetSoundAlias( announcement, SFX_HUD_ANNOUNCE_QUICK ) + Announcement_SetStyle( announcement, ANNOUNCEMENT_STYLE_QUICK ) + AnnouncementFromClass( localPlayer, announcement ) +} + +void function ServerCallback_AnnounceHidden( int survivorEHandle ) +{ + entity player = GetEntityFromEncodedEHandle( survivorEHandle ) + + AnnouncementData announcement = Announcement_Create( Localize( "#HIDDEN_FIRST_HIDDEN", player.GetPlayerName() ) ) + //Announcement_SetSubText( announcement, "#INFECTION_KILL_LAST_SURVIVOR" ) + Announcement_SetTitleColor( announcement, <1,0,0> ) + Announcement_SetPurge( announcement, true ) + Announcement_SetPriority( announcement, 200 ) //Be higher priority than Titanfall ready indicator etc + Announcement_SetSoundAlias( announcement, SFX_HUD_ANNOUNCE_QUICK ) + Announcement_SetStyle( announcement, ANNOUNCEMENT_STYLE_QUICK ) + AnnouncementFromClass( GetLocalViewPlayer(), announcement ) +} \ No newline at end of file diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_chamber.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_chamber.nut new file mode 100644 index 000000000..e78a020b2 --- /dev/null +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_chamber.nut @@ -0,0 +1,41 @@ +global function Sh_GamemodeChamber_Init + +global const string GAMEMODE_CHAMBER = "chamber" + +void function Sh_GamemodeChamber_Init() +{ + // create custom gamemode + AddCallback_OnCustomGamemodesInit( CreateGamemodeChamber ) +} + +void function CreateGamemodeChamber() +{ + GameMode_Create( GAMEMODE_CHAMBER ) + GameMode_SetName( GAMEMODE_CHAMBER, "#GAMEMODE_CHAMBER" ) + GameMode_SetDesc( GAMEMODE_CHAMBER, "#PL_chamber_desc" ) + GameMode_SetGameModeAnnouncement( GAMEMODE_CHAMBER, "ffa_modeDesc" ) + GameMode_SetDefaultTimeLimits( GAMEMODE_CHAMBER, 10, 0.0 ) + GameMode_AddScoreboardColumnData( GAMEMODE_CHAMBER, "#SCOREBOARD_SCORE", PGS_ASSAULT_SCORE, 2 ) + GameMode_AddScoreboardColumnData( GAMEMODE_CHAMBER, "#SCOREBOARD_PILOT_KILLS", PGS_PILOT_KILLS, 2 ) + GameMode_SetColor( GAMEMODE_CHAMBER, [147, 204, 57, 255] ) + + AddPrivateMatchMode( GAMEMODE_CHAMBER ) // add to private lobby modes + + // set this to 25 score limit default + GameMode_SetDefaultScoreLimits( GAMEMODE_CHAMBER, 25, 0 ) + + #if SERVER + GameMode_AddServerInit( GAMEMODE_CHAMBER, GamemodeChamber_Init ) + GameMode_AddServerInit( GAMEMODE_CHAMBER, GamemodeFFAShared_Init ) + GameMode_SetPilotSpawnpointsRatingFunc( GAMEMODE_CHAMBER, RateSpawnpoints_Generic ) + GameMode_SetTitanSpawnpointsRatingFunc( GAMEMODE_CHAMBER, RateSpawnpoints_Generic ) + #elseif CLIENT + GameMode_AddClientInit( GAMEMODE_CHAMBER, ClGamemodeChamber_Init ) + GameMode_AddClientInit( GAMEMODE_CHAMBER, GamemodeFFAShared_Init ) + GameMode_AddClientInit( GAMEMODE_CHAMBER, ClGamemodeFFA_Init ) + #endif + #if !UI + GameMode_SetScoreCompareFunc( GAMEMODE_CHAMBER, CompareAssaultScore ) + GameMode_AddSharedInit( GAMEMODE_CHAMBER, GamemodeFFA_Dialogue_Init ) + #endif +} diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hidden.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hidden.nut new file mode 100644 index 000000000..78357d200 --- /dev/null +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hidden.nut @@ -0,0 +1,44 @@ +global function Sh_GamemodeHidden_Init + +global const string GAMEMODE_HIDDEN = "hidden" + +void function Sh_GamemodeHidden_Init() +{ + // create custom gamemode + AddCallback_OnCustomGamemodesInit( CreateGamemodeHidden ) + AddCallback_OnRegisteringCustomNetworkVars( HiddenRegisterNetworkVars ) +} + +void function CreateGamemodeHidden() +{ + GameMode_Create( GAMEMODE_HIDDEN ) + GameMode_SetName( GAMEMODE_HIDDEN, "#GAMEMODE_HIDDEN" ) + GameMode_SetDesc( GAMEMODE_HIDDEN, "#PL_hidden_desc" ) + GameMode_SetGameModeAnnouncement( GAMEMODE_HIDDEN, "ffa_modeDesc" ) + GameMode_SetDefaultTimeLimits( GAMEMODE_HIDDEN, 5, 0.0 ) + GameMode_AddScoreboardColumnData( GAMEMODE_HIDDEN, "#SCOREBOARD_SCORE", PGS_ASSAULT_SCORE, 2 ) + GameMode_AddScoreboardColumnData( GAMEMODE_HIDDEN, "#SCOREBOARD_PILOT_KILLS", PGS_PILOT_KILLS, 2 ) + GameMode_SetColor( GAMEMODE_HIDDEN, [147, 204, 57, 255] ) + + AddPrivateMatchMode( GAMEMODE_HIDDEN ) // add to private lobby modes + + #if SERVER + GameMode_AddServerInit( GAMEMODE_HIDDEN, GamemodeHidden_Init ) + GameMode_SetPilotSpawnpointsRatingFunc( GAMEMODE_HIDDEN, RateSpawnpoints_Generic ) + GameMode_SetTitanSpawnpointsRatingFunc( GAMEMODE_HIDDEN, RateSpawnpoints_Generic ) + #elseif CLIENT + GameMode_AddClientInit( GAMEMODE_HIDDEN, ClGamemodeHidden_Init ) + #endif + #if !UI + GameMode_SetScoreCompareFunc( GAMEMODE_HIDDEN, CompareAssaultScore ) + #endif +} + +void function HiddenRegisterNetworkVars() +{ + if ( GAMETYPE != GAMEMODE_HIDDEN ) + return + + Remote_RegisterFunction( "ServerCallback_YouAreHidden" ) + Remote_RegisterFunction( "ServerCallback_AnnounceHidden" ) +} -- cgit v1.2.3 From a4642158f83aa7378f58ab45d2730b682ca1f93b Mon Sep 17 00:00:00 2001 From: x3Karma Date: Mon, 3 Jan 2022 17:31:55 +0800 Subject: Add files via upload --- .../keyvalues/scripts/weapons/mp_weapon_wingman.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman.txt diff --git a/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman.txt b/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman.txt new file mode 100644 index 000000000..8255df15b --- /dev/null +++ b/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman.txt @@ -0,0 +1,11 @@ +WeaponData +{ + Mods + { + one_in_the_chamber + { + damage_near_value "9999" + damage_far_value "9999" + } + } +} \ No newline at end of file -- cgit v1.2.3 From a6be37171909ffee12adc12f53585cc33b97ec1b Mon Sep 17 00:00:00 2001 From: x3Karma Date: Mon, 3 Jan 2022 17:33:27 +0800 Subject: Adds OITC and Hidden to playlist --- Northstar.Custom/keyvalues/playlists_v2.txt | 135 +++++++++++++++++++++++++++- 1 file changed, 134 insertions(+), 1 deletion(-) diff --git a/Northstar.Custom/keyvalues/playlists_v2.txt b/Northstar.Custom/keyvalues/playlists_v2.txt index 813accb64..be52dc5ba 100644 --- a/Northstar.Custom/keyvalues/playlists_v2.txt +++ b/Northstar.Custom/keyvalues/playlists_v2.txt @@ -199,6 +199,45 @@ playlists timelimit 10 max_players 16 + gamemode_score_hint #GAMEMODE_SCORE_HINT_TDM + } + } + chamber + { + inherit defaults + vars + { + name #PL_chamber + lobbytitle #PL_chamber_lobby + description #PL_chamber_desc + hint #PL_chamber_hint + abbreviation #PL_chamber_abbr + max_players 12 + max_teams 12 + classic_mp 1 + + gamemode_score_hint #GAMEMODE_SCORE_HINT_FFA + gamemode_bullet_001 #GAMEMODE_BULLET_FFA_001 + gamemode_bullet_002 #GAMEMODE_BULLET_FFA_002 + gamemode_bullet_003 #GAMEMODE_BULLET_FFA_003 + gamemode_bullet_004 #GAMEMODE_BULLET_FFA_004 + gamemode_bullet_005 #GAMEMODE_BULLET_FFA_005 + } + } + hidden + { + inherit defaults + vars + { + name #PL_hidden + lobbytitle #PL_hidden_lobby + description #PL_hidden_desc + hint #PL_hidden_hint + abbreviation #PL_hidden_abbr + max_players 16 + max_teams 2 + classic_mp 1 + gamemode_score_hint #GAMEMODE_SCORE_HINT_TDM } } @@ -640,5 +679,99 @@ playlists } } } + chamber + { + inherit defaults + vars + { + name #PL_chamber + lobbytitle #PL_chamber_lobby + description #PL_chamber_desc + abbreviation #PL_chamber_abbr + image ps + //mixtape_slot 7 + mixtape_timeout 120 + visible 0 + } + gamemodes + { + chamber + { + maps + { + mp_forwardbase_kodai 1 + mp_grave 1 + mp_homestead 1 + mp_thaw 1 + mp_black_water_canal 1 + mp_eden 1 + mp_drydock 1 + mp_crashsite3 1 + mp_complex3 1 + mp_angel_city 1 + mp_colony02 1 + mp_glitch 1 + mp_lf_stacks 1 + mp_lf_deck 1 + mp_lf_meadow 1 + mp_lf_traffic 1 + mp_lf_township 1 + mp_lf_uma 1 + mp_relic02 1 + mp_wargames 1 + mp_rise 1 + mp_coliseum 1 + mp_coliseum_column 1 + } + } + } + } + hidden + { + inherit defaults + vars + { + name #PL_hidden + lobbytitle #PL_hidden_lobby + description #PL_hidden_desc + abbreviation #PL_hidden_abbr + image ps + //mixtape_slot 7 + mixtape_timeout 120 + visible 0 + } + gamemodes + { + hidden + { + maps + { + mp_forwardbase_kodai 1 + mp_grave 1 + mp_homestead 1 + mp_thaw 1 + mp_black_water_canal 1 + mp_eden 1 + mp_drydock 1 + mp_crashsite3 1 + mp_complex3 1 + mp_angel_city 1 + mp_colony02 1 + mp_glitch 1 + mp_lf_stacks 1 + mp_lf_deck 1 + mp_lf_meadow 1 + mp_lf_traffic 1 + mp_lf_township 1 + mp_lf_uma 1 + mp_relic02 1 + mp_wargames 1 + mp_rise 1 + mp_coliseum 1 + mp_coliseum_column 1 + } + } + } + } } -} \ No newline at end of file +} -- cgit v1.2.3 From 0fe7ec431c2de4f83c2d6e3663f17f15bf49326d Mon Sep 17 00:00:00 2001 From: x3Karma Date: Mon, 3 Jan 2022 17:35:33 +0800 Subject: adds OITC and Hidden to mod.json --- Northstar.Custom/mod.json | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/Northstar.Custom/mod.json b/Northstar.Custom/mod.json index 7b2ad50d7..4805e3468 100644 --- a/Northstar.Custom/mod.json +++ b/Northstar.Custom/mod.json @@ -41,6 +41,48 @@ "RunOn": "( CLIENT || SERVER ) && MP", }, + // one in the chamber + { + "Path": "gamemodes/sh_gamemode_chamber.nut", + "RunOn": "( CLIENT || SERVER ) && MP", + "ClientCallback": { + "Before": "Sh_GamemodeChamber_Init" + }, + + "ServerCallback": { + "Before": "Sh_GamemodeChamber_Init" + } + }, + { + "Path": "gamemodes/_gamemode_chamber.nut", + "RunOn": "SERVER && MP" + }, + { + "Path": "gamemodes/cl_gamemode_chamber.nut", + "RunOn": "CLIENT && MP" + }, + + // Hidden + { + "Path": "gamemodes/sh_gamemode_hidden.nut", + "RunOn": "( CLIENT || SERVER ) && MP", + "ClientCallback": { + "Before": "Sh_GamemodeHidden_Init" + }, + + "ServerCallback": { + "Before": "Sh_GamemodeHidden_Init" + } + }, + { + "Path": "gamemodes/_gamemode_hidden.nut", + "RunOn": "SERVER && MP" + }, + { + "Path": "gamemodes/cl_gamemode_hidden.nut", + "RunOn": "CLIENT && MP" + }, + // fortwar { "Path": "gamemodes/sh_gamemode_fw_custom.nut", @@ -371,4 +413,4 @@ "Localisation": [ "resource/northstar_custom_%language%.txt" ] -} \ No newline at end of file +} -- cgit v1.2.3 From d6daad7aa0b369b3363132edaa277b88391d474d Mon Sep 17 00:00:00 2001 From: x3Karma Date: Tue, 4 Jan 2022 00:36:30 +0800 Subject: Fix indentations in mod.json --- Northstar.Custom/mod.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Northstar.Custom/mod.json b/Northstar.Custom/mod.json index 797016db4..e687264c1 100644 --- a/Northstar.Custom/mod.json +++ b/Northstar.Custom/mod.json @@ -56,11 +56,10 @@ "Path": "gamemodes/_gamemode_chamber.nut", "RunOn": "SERVER && MP" }, - { + { "Path": "gamemodes/cl_gamemode_chamber.nut", "RunOn": "CLIENT && MP" }, - { "Path": "gamemodes/sh_gamemode_hidden.nut", "RunOn": "( CLIENT || SERVER ) && MP", @@ -76,7 +75,7 @@ "Path": "gamemodes/_gamemode_hidden.nut", "RunOn": "SERVER && MP" }, - { + { "Path": "gamemodes/cl_gamemode_hidden.nut", "RunOn": "CLIENT && MP" }, -- cgit v1.2.3 From 8a9859da2a38c3267148cbb55670276049f81c87 Mon Sep 17 00:00:00 2001 From: x3Karma Date: Tue, 4 Jan 2022 00:40:36 +0800 Subject: fix indentations in playlists --- Northstar.Custom/keyvalues/playlists_v2.txt | 207 ++++++++++++++-------------- 1 file changed, 107 insertions(+), 100 deletions(-) diff --git a/Northstar.Custom/keyvalues/playlists_v2.txt b/Northstar.Custom/keyvalues/playlists_v2.txt index be52dc5ba..37734025c 100644 --- a/Northstar.Custom/keyvalues/playlists_v2.txt +++ b/Northstar.Custom/keyvalues/playlists_v2.txt @@ -264,18 +264,18 @@ playlists { maps { - mp_forwardbase_kodai 1 - mp_grave 1 - mp_homestead 1 - mp_thaw 1 - mp_black_water_canal 1 - mp_eden 1 - mp_drydock 1 - mp_crashsite3 1 - mp_complex3 1 - mp_angel_city 1 - mp_colony02 1 - mp_glitch 1 + mp_forwardbase_kodai 1 + mp_grave 1 + mp_homestead 1 + mp_thaw 1 + mp_black_water_canal 1 + mp_eden 1 + mp_drydock 1 + mp_crashsite3 1 + mp_complex3 1 + mp_angel_city 1 + mp_colony02 1 + mp_glitch 1 mp_lf_stacks 1 mp_lf_deck 1 mp_lf_meadow 1 @@ -308,18 +308,19 @@ playlists { maps { - mp_forwardbase_kodai 1 - mp_grave 1 - mp_homestead 1 - mp_thaw 1 - mp_black_water_canal 1 - mp_eden 1 - mp_drydock 1 - mp_crashsite3 1 - mp_complex3 1 - mp_angel_city 1 - mp_colony02 1 - mp_glitch 1 + mp_forwardbase_kodai 1 + mp_grave 1 + mp_homestead 1 + mp_thaw 1 + mp_black_water_canal 1 + mp_eden 1 + mp_drydock 1 + mp_crashsite3 1 + mp_complex3 1 + mp_angel_city 1 + mp_colony02 1 + mp_glitch 1 + mp_lf_stacks 1 mp_relic02 1 mp_wargames 1 mp_rise 1 @@ -346,18 +347,19 @@ playlists { maps { - mp_forwardbase_kodai 1 - mp_grave 1 - mp_homestead 1 - mp_thaw 1 - mp_black_water_canal 1 - mp_eden 1 - mp_drydock 1 - mp_crashsite3 1 - mp_complex3 1 - mp_angel_city 1 - mp_colony02 1 - mp_glitch 1 + mp_forwardbase_kodai 1 + mp_grave 1 + mp_homestead 1 + mp_thaw 1 + mp_black_water_canal 1 + mp_eden 1 + mp_drydock 1 + mp_crashsite3 1 + mp_complex3 1 + mp_angel_city 1 + mp_colony02 1 + mp_glitch 1 + mp_lf_stacks 1 mp_lf_stacks 1 mp_lf_deck 1 mp_lf_meadow 1 @@ -399,18 +401,19 @@ playlists { maps { - mp_forwardbase_kodai 1 - mp_grave 1 - mp_homestead 1 - mp_thaw 1 - mp_black_water_canal 1 - mp_eden 1 - mp_drydock 1 - mp_crashsite3 1 - mp_complex3 1 - mp_angel_city 1 - mp_colony02 1 - mp_glitch 1 + mp_forwardbase_kodai 1 + mp_grave 1 + mp_homestead 1 + mp_thaw 1 + mp_black_water_canal 1 + mp_eden 1 + mp_drydock 1 + mp_crashsite3 1 + mp_complex3 1 + mp_angel_city 1 + mp_colony02 1 + mp_glitch 1 + mp_lf_stacks 1 mp_lf_stacks 1 mp_lf_deck 1 mp_lf_meadow 1 @@ -447,18 +450,19 @@ playlists { maps { - mp_forwardbase_kodai 1 - mp_grave 1 - mp_homestead 1 - mp_thaw 1 - mp_black_water_canal 1 - mp_eden 1 - mp_drydock 1 - mp_crashsite3 1 - mp_complex3 1 - mp_angel_city 1 - mp_colony02 1 - mp_glitch 1 + mp_forwardbase_kodai 1 + mp_grave 1 + mp_homestead 1 + mp_thaw 1 + mp_black_water_canal 1 + mp_eden 1 + mp_drydock 1 + mp_crashsite3 1 + mp_complex3 1 + mp_angel_city 1 + mp_colony02 1 + mp_glitch 1 + mp_lf_stacks 1 mp_lf_stacks 1 mp_lf_deck 1 mp_lf_meadow 1 @@ -498,18 +502,19 @@ playlists { maps { - mp_forwardbase_kodai 1 - mp_grave 1 - mp_homestead 1 - mp_thaw 1 - mp_black_water_canal 1 - mp_eden 1 - mp_drydock 1 - mp_crashsite3 1 - mp_complex3 1 - mp_angel_city 1 - mp_colony02 1 - mp_glitch 1 + mp_forwardbase_kodai 1 + mp_grave 1 + mp_homestead 1 + mp_thaw 1 + mp_black_water_canal 1 + mp_eden 1 + mp_drydock 1 + mp_crashsite3 1 + mp_complex3 1 + mp_angel_city 1 + mp_colony02 1 + mp_glitch 1 + mp_lf_stacks 1 mp_relic02 1 mp_wargames 1 mp_rise 1 @@ -699,18 +704,19 @@ playlists { maps { - mp_forwardbase_kodai 1 - mp_grave 1 - mp_homestead 1 - mp_thaw 1 - mp_black_water_canal 1 - mp_eden 1 - mp_drydock 1 - mp_crashsite3 1 - mp_complex3 1 - mp_angel_city 1 - mp_colony02 1 - mp_glitch 1 + mp_forwardbase_kodai 1 + mp_grave 1 + mp_homestead 1 + mp_thaw 1 + mp_black_water_canal 1 + mp_eden 1 + mp_drydock 1 + mp_crashsite3 1 + mp_complex3 1 + mp_angel_city 1 + mp_colony02 1 + mp_glitch 1 + mp_lf_stacks 1 mp_lf_stacks 1 mp_lf_deck 1 mp_lf_meadow 1 @@ -720,8 +726,8 @@ playlists mp_relic02 1 mp_wargames 1 mp_rise 1 - mp_coliseum 1 - mp_coliseum_column 1 + mp_coliseum 1 + mp_coliseum_column 1 } } } @@ -746,18 +752,19 @@ playlists { maps { - mp_forwardbase_kodai 1 - mp_grave 1 - mp_homestead 1 - mp_thaw 1 - mp_black_water_canal 1 - mp_eden 1 - mp_drydock 1 - mp_crashsite3 1 - mp_complex3 1 - mp_angel_city 1 - mp_colony02 1 - mp_glitch 1 + mp_forwardbase_kodai 1 + mp_grave 1 + mp_homestead 1 + mp_thaw 1 + mp_black_water_canal 1 + mp_eden 1 + mp_drydock 1 + mp_crashsite3 1 + mp_complex3 1 + mp_angel_city 1 + mp_colony02 1 + mp_glitch 1 + mp_lf_stacks 1 mp_lf_stacks 1 mp_lf_deck 1 mp_lf_meadow 1 @@ -767,8 +774,8 @@ playlists mp_relic02 1 mp_wargames 1 mp_rise 1 - mp_coliseum 1 - mp_coliseum_column 1 + mp_coliseum 1 + mp_coliseum_column 1 } } } -- cgit v1.2.3 From 22bb30829471a78ff2a805b2fb6145d6f600e281 Mon Sep 17 00:00:00 2001 From: x3Karma Date: Tue, 4 Jan 2022 00:46:00 +0800 Subject: Fix indentations in _gamemode_hidden.nut --- .../vscripts/gamemodes/_gamemode_hidden.nut | 68 +++++++++++----------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hidden.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hidden.nut index 6043ab355..4d52835b3 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hidden.nut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hidden.nut @@ -121,11 +121,10 @@ void function HiddenOnPlayerKilled( entity victim, entity attacker, var damageIn return if ( attacker.IsPlayer() ) - { + { // increase kills by 1 attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 ) - } - + } } @@ -133,14 +132,14 @@ void function UpdateLoadout( entity player ) { string p2016 = "mp_weapon_wingman_n" foreach ( entity weapon in player.GetMainWeapons() ) - { + { if (weapon.GetWeaponClassName() == p2016) { weapon.SetWeaponPrimaryAmmoCount(0) weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCountMax()) } - } - WaitFrame() + } + WaitFrame() if ( IsValid( player ) ) PlayerEarnMeter_SetMode( player, eEarnMeterMode.DISABLED ) } @@ -156,34 +155,35 @@ void function RemoveHidden() void function PredatorMain() { - while (true) { - WaitFrame() - if(!IsLobby()) - { - foreach (entity player in GetPlayerArray()) - { - if (player == null || !IsValid(player) || !IsAlive(player) || player.GetTeam() != TEAM_IMC) - continue - vector playerVelV = player.GetVelocity() - float playerVel - playerVel = sqrt(playerVelV.x * playerVelV.x + playerVelV.y * playerVelV.y + playerVelV.z * playerVelV.z) - float playerVelNormal = playerVel * 0.068544 - if (playerVel/300 < 1.3) - { - player.SetCloakFlicker(0, 0) - player.kv.VisibilityFlags = 0 - } - else - { - player.SetCloakFlicker(0.2 , 1 ) - player.kv.VisibilityFlags = 0 - float waittime = RandomFloat(0.5) - wait waittime - player.kv.VisibilityFlags = ENTITY_VISIBLE_TO_EVERYONE - } - } - } - } + while (true) + { + WaitFrame() + if(!IsLobby()) + { + foreach (entity player in GetPlayerArray()) + { + if (player == null || !IsValid(player) || !IsAlive(player) || player.GetTeam() != TEAM_IMC) + continue + vector playerVelV = player.GetVelocity() + float playerVel + playerVel = sqrt(playerVelV.x * playerVelV.x + playerVelV.y * playerVelV.y + playerVelV.z * playerVelV.z) + float playerVelNormal = playerVel * 0.068544 + if (playerVel/300 < 1.3) + { + player.SetCloakFlicker(0, 0) + player.kv.VisibilityFlags = 0 + } + else + { + player.SetCloakFlicker(0.2 , 1 ) + player.kv.VisibilityFlags = 0 + float waittime = RandomFloat(0.5) + wait waittime + player.kv.VisibilityFlags = ENTITY_VISIBLE_TO_EVERYONE + } + } + } + } } int function TimeoutCheckSurvivors() -- cgit v1.2.3 From 8f3f0cfc089f0388862865e4758a130201aca1ce Mon Sep 17 00:00:00 2001 From: x3Karma Date: Tue, 4 Jan 2022 00:48:45 +0800 Subject: Fix indentations in _gamemode_chamber.nut --- .../vscripts/gamemodes/_gamemode_chamber.nut | 57 ++++++++++------------ 1 file changed, 26 insertions(+), 31 deletions(-) diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut index 4ee47aafc..bbd669cd0 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut @@ -1,12 +1,8 @@ global function GamemodeChamber_Init -struct { - -} file - void function GamemodeChamber_Init() { - SetSpawnpointGamemodeOverride( FFA ) + SetSpawnpointGamemodeOverride( FFA ) SetShouldUseRoundWinningKillReplay( true ) SetLoadoutGracePeriodEnabled( false ) // prevent modifying loadouts with grace period @@ -32,7 +28,7 @@ void function ChamberOnPlayerKilled( entity victim, entity attacker, var damageI return if ( attacker.IsPlayer() ) - { + { attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 ) AddTeamScore( attacker.GetTeam(), 1 ) if ( DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.human_execution ) @@ -42,59 +38,58 @@ void function ChamberOnPlayerKilled( entity victim, entity attacker, var damageI SendHudMessage( player, message, -1, 0.4, 255, 0, 0, 0, 0, 3, 0.15 ) foreach ( entity weapon in attacker.GetMainWeapons() ) - { - weapon.SetWeaponPrimaryAmmoCount(0) + { + weapon.SetWeaponPrimaryAmmoCount(0) int clip = weapon.GetWeaponPrimaryClipCount() + 4 if (weapon.GetWeaponPrimaryClipCountMax() < clip) weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCountMax()) else weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCount() + 4) - } + } } else { - foreach ( entity weapon in attacker.GetMainWeapons() ) - { - weapon.SetWeaponPrimaryAmmoCount(0) + foreach ( entity weapon in attacker.GetMainWeapons() ) + { + weapon.SetWeaponPrimaryAmmoCount(0) int clip = weapon.GetWeaponPrimaryClipCount() + 1 if (weapon.GetWeaponPrimaryClipCountMax() < clip) weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCountMax()) else weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCount() + 1) - } + } } SetRoundWinningKillReplayAttacker(attacker) - } + } } void function UpdateLoadout( entity player ) { - // set health to 1 to allow one shot kills - if (IsAlive(player) && player != null) + if (IsAlive(player) && player != null) { - // set loadout - foreach ( entity weapon in player.GetMainWeapons() ) - player.TakeWeaponNow( weapon.GetWeaponClassName() ) + // set loadout + foreach ( entity weapon in player.GetMainWeapons() ) + player.TakeWeaponNow( weapon.GetWeaponClassName() ) - foreach ( entity weapon in player.GetOffhandWeapons() ) - player.TakeWeaponNow( weapon.GetWeaponClassName() ) + foreach ( entity weapon in player.GetOffhandWeapons() ) + player.TakeWeaponNow( weapon.GetWeaponClassName() ) - array mods = ["one_in_the_chamber"] - player.GiveWeapon( "mp_weapon_wingman", mods) - player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE ) + array mods = ["one_in_the_chamber"] + player.GiveWeapon( "mp_weapon_wingman", mods) + player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE ) - thread SetAmmo( player ) - } + thread SetAmmo( player ) + } } void function SetAmmo( entity player ) { foreach ( entity weapon in player.GetMainWeapons() ) - { - weapon.SetWeaponPrimaryAmmoCount(0) - weapon.SetWeaponPrimaryClipCount(1) - } - WaitFrame() + { + weapon.SetWeaponPrimaryAmmoCount(0) + weapon.SetWeaponPrimaryClipCount(1) + } + WaitFrame() if ( IsValid( player ) ) PlayerEarnMeter_SetMode( player, eEarnMeterMode.DISABLED ) } -- cgit v1.2.3