Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new features and missing language file #590

Draft
wants to merge 63 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
751a33d
add a fucntion for check
zxcPandora Feb 9, 2023
cd0541f
protect titan and add protection Highlight
zxcPandora Feb 9, 2023
81cf3bb
add playlist var
zxcPandora Feb 9, 2023
bb8852c
Merge branch 'main_bug_fix' of https://github.com/zxcPandora/Northsta…
zxcPandora Feb 9, 2023
1bb47d4
localized strings
zxcPandora Feb 9, 2023
c4d3fe5
localization
zxcPandora Feb 9, 2023
2a6e70d
Merge branch 'main' into main_bug_fix
zxcPandora Feb 10, 2023
72a0c21
Update sh_private_lobby_modes_init.gnut
zxcPandora Feb 10, 2023
f7d3469
Update northstar_custom_tchinese.txt
zxcPandora Feb 10, 2023
8651363
Merge branch 'main_bug_fix' of https://github.com/zxcPandora/Northsta…
zxcPandora Feb 10, 2023
5494d6f
more attack action check
zxcPandora Feb 14, 2023
04b1ba0
player status check
zxcPandora Feb 14, 2023
c6007a6
Update _respawn_protection.gnut
zxcPandora Feb 14, 2023
738bc0f
protect all titan
zxcPandora Feb 15, 2023
9bcd008
avoid server crash
zxcPandora Feb 23, 2023
6cfc7e4
Merge branch 'main' into main_bug_fix
zxcPandora Feb 26, 2023
b925607
Merge branch 'main' into main_bug_fix
zxcPandora Feb 28, 2023
43836d4
Merge branch 'main' into main_bug_fix
zxcPandora Mar 2, 2023
1ecbce6
Merge branch 'main' into main_bug_fix
zxcPandora Mar 3, 2023
28bf4e2
Merge branch 'main' into main_bug_fix
zxcPandora Mar 8, 2023
555c37f
Merge branch 'main' into main_bug_fix
zxcPandora Mar 9, 2023
0951eed
Update northstar_custom_english.txt
zxcPandora Mar 10, 2023
175571b
Merge branch 'main_bug_fix' of https://github.com/zxcPandora/Northsta…
zxcPandora Mar 10, 2023
e144381
Merge branch 'main' into main_bug_fix
zxcPandora Mar 10, 2023
0a8a23a
Update northstar_custom_english.txt
zxcPandora Mar 10, 2023
91b6f8f
Merge branch 'main_bug_fix' of https://github.com/zxcPandora/Northsta…
zxcPandora Mar 10, 2023
e3d8b89
Merge branch 'main' into main_bug_fix
zxcPandora Mar 13, 2023
3cb3c9d
avoid cam error
zxcPandora Mar 19, 2023
a3b3a3a
Merge branch 'main' into main_bug_fix
zxcPandora Mar 29, 2023
aa76c8b
avoid script error due to invalid rodeo target
zxcPandora Apr 3, 2023
5e6bef7
Update _rodeo.gnut
zxcPandora Apr 3, 2023
b7397d9
Merge branch 'main' into main_bug_fix
zxcPandora Apr 6, 2023
f1541d1
Merge branch 'main' into main_bug_fix
zxcPandora Apr 15, 2023
91f546d
Merge branch 'main' into main_bug_fix
zxcPandora Apr 20, 2023
ba85b1b
delete unnecessary word in other language file
zxcPandora Apr 24, 2023
c61918f
Update _respawn_protection.gnut
zxcPandora Apr 24, 2023
00f0b0f
Merge branch 'main' into main_bug_fix
zxcPandora Apr 24, 2023
2ac824b
Merge branch 'main' into main_bug_fix
zxcPandora Apr 27, 2023
66be62a
Merge branch 'main' into main_bug_fix
zxcPandora Jul 17, 2023
f6b5990
Merge branch 'main' into main_bug_fix
zxcPandora Jul 21, 2023
718b52b
Merge branch 'main' into main_bug_fix
zxcPandora Jul 24, 2023
944e1e2
Merge branch 'main' into main_bug_fix
zxcPandora Jul 26, 2023
27269cc
Merge branch 'main' into main_bug_fix
zxcPandora Aug 1, 2023
5aa6a68
Resolve conflicts
zxcPandora Aug 7, 2023
f53d89a
add arc cannon translate
zxcPandora Aug 7, 2023
88d42a7
Merge branch 'main' into main_bug_fix
zxcPandora Aug 18, 2023
c7c9181
Update northstar_custom_english.txt
zxcPandora Aug 29, 2023
82f9b2e
Merge branch 'main' into main_bug_fix
zxcPandora Sep 5, 2023
0c942a0
Merge branch 'main' into main_bug_fix
zxcPandora Sep 18, 2023
65143d3
Merge branch 'main' into main_bug_fix
zxcPandora Sep 18, 2023
fbd57c1
Merge branch 'main' into main_bug_fix
zxcPandora Sep 19, 2023
b85c21a
Merge branch 'main' into main_bug_fix
zxcPandora Oct 16, 2023
872642f
Merge branch 'main' into main_bug_fix
zxcPandora Oct 19, 2023
98a1e28
Merge branch 'main' into main_bug_fix
zxcPandora Oct 23, 2023
a035a41
Merge branch 'main' into main_bug_fix
zxcPandora Nov 19, 2023
a0f235f
Merge branch 'main' into main_bug_fix
zxcPandora Nov 29, 2023
cc762e5
Merge branch 'main' into main_bug_fix
zxcPandora Jan 4, 2024
ecaafa4
Merge branch 'main' into main_bug_fix
zxcPandora Jan 28, 2024
8e41af8
Merge branch 'main' into main_bug_fix
zxcPandora Feb 5, 2024
80685fa
Merge branch 'main' into main_bug_fix
zxcPandora Mar 5, 2024
b0c1e3e
Merge branch 'main' into main_bug_fix
zxcPandora Jul 11, 2024
35de35d
Merge branch 'main' into main_bug_fix
GeckoEidechse Aug 12, 2024
819ad15
Merge branch 'main' into main_bug_fix
Zanieon Oct 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Press Yes if you agree to this. This choice can be changed in the mods menu at a
"timelimit" "Time Limit"
"roundtimelimit" "Time Limit (round-based)"
"respawnprotection" "Respawn Protection Time"
"late_join_respawn" "Enable late join respawn"

"pilot_health_multiplier" "Health multiplier"
"respawn_delay" "Respawn Delay"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"timelimit" "時間限制"
"roundtimelimit" "時間限制(回合制)"
"respawnprotection" "重生保護時間"
"late_join_respawn" "中途加入復活"

"pilot_health_multiplier" "生命值加成"
"respawn_delay" "重生延遲"
Expand Down
Binary file modified Northstar.Custom/mod/resource/northstar_custom_english.txt
Binary file not shown.
Binary file not shown.
20 changes: 14 additions & 6 deletions Northstar.Custom/mod/scripts/vscripts/rodeo/_rodeo_titan.gnut
Original file line number Diff line number Diff line change
Expand Up @@ -613,14 +613,22 @@ function PlayerBeginsTitanRodeo( entity player, RodeoPackageStruct rodeoPackage,

if ( IsAlive( player ) )
{
int attachIndex = newRodeoTitan.LookupAttachment( rodeoPackage.attachPoint )
vector startPos = newRodeoTitan.GetAttachmentOrigin( attachIndex )

if ( !PlayerCanTeleportHere( player, startPos, newRodeoTitan ) )
vector startPos
if( IsValid( newRodeoTitan ) )
{
startPos = newRodeoTitan.GetOrigin()
int attachIndex = newRodeoTitan.LookupAttachment( rodeoPackage.attachPoint )
startPos = newRodeoTitan.GetAttachmentOrigin( attachIndex )

if ( !PlayerCanTeleportHere( player, startPos, newRodeoTitan ) )
startPos = player.GetOrigin()
{
startPos = newRodeoTitan.GetOrigin()
if ( !PlayerCanTeleportHere( player, startPos, newRodeoTitan ) )
startPos = player.GetOrigin()
}
}
else
{
startPos = player.GetOrigin()
}

thread PlayerJumpsOffRodeoTarget( player, newRodeoTitan, startPos )
Expand Down
Original file line number Diff line number Diff line change
@@ -1,39 +1,113 @@
global function RespawnProtection_Init
global function IsRespawnProtectionActive

struct
{
array< entity > players
} file

void function RespawnProtection_Init(){
RegisterSignal( "StopProtection" )
AddCallback_OnPlayerRespawned( OnPlayerRespawned )
}

void function OnPlayerRespawned( entity player )
{
thread RespawnProtection(player,GetCurrentPlaylistVarFloat("respawnprotection",0.0))
float time = GetCurrentPlaylistVarFloat( "respawnprotection", 0.0 )
if( time > 0.0 )
{
AddButtonPressedPlayerInputCallback( player, IN_ATTACK, ForceStopProtection )
AddButtonPressedPlayerInputCallback( player, IN_OFFHAND0, ForceStopProtection )
AddButtonPressedPlayerInputCallback( player, IN_OFFHAND2, ForceStopProtection )
AddButtonPressedPlayerInputCallback( player, IN_OFFHAND4, ForceStopProtection )
AddButtonPressedPlayerInputCallback( player, IN_MELEE, ForceStopProtection )
AddButtonPressedPlayerInputCallback( player, IN_USE, ForceStopProtection )
thread RespawnProtection( player, time )
}
}

void function ForceStopProtection( entity player )
{
player.Signal( "StopProtection" )
}

bool function IsRespawnProtectionActive( entity player )
{
if ( player == null )
return false
if ( !IsValid( player ) )
return false

return file.players.contains( player )
}

void function RespawnProtection( entity player , float time ){
OnThreadEnd(
function() : ( player )
{
//cancel protect if player attack
if( IsDemigod( player ) )
if( IsValid( player ) )
{
ForceStopProtection( player )
if( file.players.contains( player ) )
file.players.fastremovebyvalue( player )
RemoveButtonPressedPlayerInputCallback( player, IN_ATTACK, ForceStopProtection )
RemoveButtonPressedPlayerInputCallback( player, IN_OFFHAND0, ForceStopProtection )
RemoveButtonPressedPlayerInputCallback( player, IN_OFFHAND2, ForceStopProtection )
RemoveButtonPressedPlayerInputCallback( player, IN_OFFHAND4, ForceStopProtection )
RemoveButtonPressedPlayerInputCallback( player, IN_MELEE, ForceStopProtection )
RemoveButtonPressedPlayerInputCallback( player, IN_USE, ForceStopProtection )
SetDefaultMPEnemyHighlight( player )
DisableDemigod( player );
player.ClearInvulnerable()
}
}
)

player.EndSignal( "OnDeath" )
player.EndSignal( "OnDestroy" )
player.EndSignal( "OnPrimaryAttack" )
player.EndSignal( "RodeoStarted" )
player.EndSignal( "StopProtection" )

if( IsDemigod( player ) )
if( IsValid( player ) )
{
DisableDemigod( player );
}
else{
//start protect
EnableDemigod( player )
wait time
//cancel protect
DisableDemigod( player );
if( player.GetPersistentVar( "spawnAsTitan" ) || Riff_SpawnAsTitan() )
{
player.WaitSignal( "PlayerEmbarkedTitan" )
player.SetInvulnerable()
}
else if( player.IsTitan() )
{
player.SetInvulnerable()
}
else
{
EnableDemigod( player )
}

//start a highlight
waitthread ProtectionHighlightThink( player, time )
}
}

void function ProtectionHighlightThink( entity player, float time )
{
player.EndSignal( "OnDeath" )
player.EndSignal( "OnDestroy" )
player.EndSignal( "OnPrimaryAttack" )
player.EndSignal( "RodeoStarted" )
player.EndSignal( "StopProtection" )

float startTime = Time()
while( Time() - startTime <= time )
{
if( IsValid( player ) )
{
Highlight_SetEnemyHighlight( player, "sp_enemy_pilot" )
player.Highlight_SetParam( 2, 0, < 255,215,0 > )
}
WaitFrame()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ void function PrivateMatchModesInit()
AddPrivateMatchModeSettingArbitrary( "#MODE_SETTING_CATEGORY_MATCH", "timelimit", "12" ) //, "Time Limit" )
AddPrivateMatchModeSettingArbitrary( "#MODE_SETTING_CATEGORY_MATCH", "roundtimelimit", "0" ) //, "Time Limit (round-based modes)" )
AddPrivateMatchModeSettingArbitrary( "#MODE_SETTING_CATEGORY_MATCH", "respawnprotection", "0.0" ) //, "Player Respawn Protection Time" )
AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_MATCH", "late_join_respawn", [ "#SETTING_DISABLED", "#SETTING_ENABLED" ], "1" )

AddPrivateMatchModeSettingArbitrary( "#MODE_SETTING_CATEGORY_PILOT", "pilot_health_multiplier", "1.0" )
AddPrivateMatchModeSettingArbitrary( "#MODE_SETTING_CATEGORY_PILOT", "respawn_delay", "0.0" )
Expand Down Expand Up @@ -57,4 +58,4 @@ void function PrivateMatchModesInit()
// maps
AddPrivateMatchMap( "mp_coliseum" )
AddPrivateMatchMap( "mp_coliseum_column" )
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ global function DecideRespawnPlayer
global function RespawnAsPilot
global function RespawnAsTitan
global function TryGameModeAnnouncement
global function SetLateJoinRespawnEnabled

global function SetKillcamsEnabled
global function KillcamsEnabled
Expand All @@ -24,6 +25,7 @@ global function SetRecalculateRespawnAsTitanStartPointCallback
struct {
bool killcamsEnabled = true
bool playerDeathsHidden = false
bool shouldDoRespawnForLatePlayer = true
int titanDamageGameStat = -1

entity intermissionCamera
Expand All @@ -43,6 +45,8 @@ void function BaseGametype_Init_MPSP()
AddCallback_OnPlayerKilled( CheckForAutoTitanDeath )
RegisterSignal( "PlayerRespawnStarted" )
RegisterSignal( "KillCamOver" )

file.shouldDoRespawnForLatePlayer = GetCurrentPlaylistVarInt( "late_join_respawn", 1 ) == 1
}

void function SetIntermissionCamera( entity camera )
Expand Down Expand Up @@ -174,6 +178,12 @@ void function CodeCallback_OnClientConnectionCompleted( entity player )
player.SetPersistentVar( "privateMatchState", 0 )

// handle spawning late joiners
if( file.shouldDoRespawnForLatePlayer )
HandleRespawnForLateJoiner( player )
}

void function HandleRespawnForLateJoiner( entity player )
{
if ( GetGameState() == eGameState.Playing )
{
if ( RespawnsEnabled() )
Expand Down Expand Up @@ -344,7 +354,8 @@ void function PostDeathThread_MP( entity player, var damageInfo ) // based on ga
{
player.SetObserverModeStaticPosition( file.intermissionCamera.GetOrigin() )
player.SetObserverModeStaticAngles( file.intermissionCamera.GetAngles() )
player.StartObserverMode( OBS_MODE_STATIC_LOCKED )
if( !IsValid( player.GetParent() ) )
player.StartObserverMode( OBS_MODE_STATIC_LOCKED )
player.SetObserverTarget( null )
}

Expand Down Expand Up @@ -534,6 +545,11 @@ void function TryGameModeAnnouncement( entity player ) // only putting this here
PlayFactionDialogueToPlayer( GameMode_GetGameModeAnnouncement( GAMETYPE ), player )
}

void function SetLateJoinRespawnEnabled( bool enabled )
{
file.shouldDoRespawnForLatePlayer = enabled
}

void function SetKillcamsEnabled( bool enabled )
{
file.killcamsEnabled = enabled
Expand Down
20 changes: 14 additions & 6 deletions Northstar.CustomServers/mod/scripts/vscripts/rodeo/_rodeo.gnut
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,22 @@ function PlayerBeginsNPCRodeo( entity player, RodeoPackageStruct rodeoPackage, e

if ( IsAlive( player ) )
{
int attachIndex = newRodeoTarget.LookupAttachment( rodeoPackage.attachPoint )
vector startPos = newRodeoTarget.GetAttachmentOrigin( attachIndex )

if ( !PlayerCanTeleportHere( player, startPos, newRodeoTarget ) )
vector startPos
if( IsValid( newRodeoTarget ) )
{
startPos = newRodeoTarget.GetOrigin()
int attachIndex = newRodeoTarget.LookupAttachment( rodeoPackage.attachPoint )
startPos = newRodeoTarget.GetAttachmentOrigin( attachIndex )

if ( !PlayerCanTeleportHere( player, startPos, newRodeoTarget ) )
startPos = player.GetOrigin()
{
startPos = newRodeoTarget.GetOrigin()
if ( !PlayerCanTeleportHere( player, startPos, newRodeoTarget ) )
startPos = player.GetOrigin()
}
}
else
{
startPos = player.GetOrigin()
}

thread PlayerJumpsOffRodeoTarget( player, newRodeoTarget, startPos )
Expand Down
Loading