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

[FEAT] Co-op #210

Draft
wants to merge 77 commits into
base: main
Choose a base branch
from
Draft

[FEAT] Co-op #210

wants to merge 77 commits into from

Conversation

xamionex
Copy link

death and more

@xamionex xamionex mentioned this pull request Feb 15, 2022
8 tasks
@abarichello
Copy link
Contributor

Closes #207

@abarichello abarichello linked an issue Feb 15, 2022 that may be closed by this pull request
8 tasks
@catornot
Copy link
Member

catornot commented Sep 23, 2022

can someone review co-op?

player.s.inPostDeath = false
player.s.respawnSelectionDone = true
DoRespawnPlayer( player, null )
ClientCommand( player,"script_client thread MainHud_TurnOn_RUI( true )" ) // TODO: can this help with no hud on dedi?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't clientcommands get yeeted?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't test rn, but this should no longer work on latest

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might be the reason for the broken ui on dedi servers :(

@F1F7Y
Copy link
Member

F1F7Y commented Sep 23, 2022

Also could you maybe tell us what you changed in the *.ent files ?

@uniboi
Copy link
Contributor

uniboi commented Sep 23, 2022

Also could you maybe tell us what you changed in the *.ent files ?

I think it would be easier for you to extract the vpks yourself and show the diffs with your text editor of choice

@F1F7Y
Copy link
Member

F1F7Y commented Sep 23, 2022

Also could you maybe tell us what you changed in the *.ent files ?

I think it would be easier for you to extract the vpks yourself and show the diffs with your text editor of choice

I asked because I dont have access to the game rn :(

@catornot
Copy link
Member

in s2s's ent file I added a stuff to spawn a third a widow ship, which serves the role of a respawn point.
in crashsite's ent file I removed a rock that blocked off slow fast people

Copy link
Contributor

@uniboi uniboi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some things I noticed after a quick look

Comment on lines 87 to 89
// massive trol
for( int x = 1; x < achievements.MAX_ACHIVEMENTS; x++ )
UnlockAchievement( player, x )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cring

Suggested change
// massive trol
for( int x = 1; x < achievements.MAX_ACHIVEMENTS; x++ )
UnlockAchievement( player, x )

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it, In a commit that I didn't push yet


wait 1

for(;;)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this loop infinite?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

people sometimes can't be respawned right away.

Comment on lines +145 to +160
foreach( p in GetPlayerArray() )
{
if ( IsValid( p ) && IsAlive( p ) && p != player && p.IsOnGround() && !p.IsWallRunning() && !p.IsWallHanging() )
{
BasicRespawnLogic( player )
player.SetOrigin( p.GetOrigin() )

if ( p.IsTitan() )
thread MakePlayerTitan( player, p.GetOrigin() )

OnTimeShiftGiveGlove( player )
if ( ( GetMapName() == "sp_beacon" || GetMapName() == "sp_beacon_spoke0" ) && Flag( "HasChargeTool" ) )
GiveBatteryChargeToolSingle( player )

player.Signal( "InternalPlayerRespawned" )
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assuming there are 3 players on a server and one dies, this would set the position of the respawning player twice. Why not break after a valid player where you can respawn is found?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it wouldn't set twice.
after the player receives the signal InternalPlayerRespawned the thread is over

well unless the needs to be respawned as a titan.
that's just how I coded it.


void function ClRespawnselect_SP_Init()
{
Assert( !IsMultiplayer() )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure this is never supposed to happen in coop. Just remove the function?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thats how respawn did it


void function CoopCustomPrecache()
{
// PrecacheWeapon( "mp_weapon_peacekraber" )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see an issue with loading the peacekraber

Suggested change
// PrecacheWeapon( "mp_weapon_peacekraber" )
PrecacheWeapon( "mp_weapon_peacekraber" )

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the peacekraber pr hasn't been merged yet :(
#398

Comment on lines +11 to +13
// create kunai damage source so game won't crash when we hit smth with it
// just using the default melee one, easier than making a new one
getconsttable()[ "eDamageSourceId" ][ "melee_pilot_kunai" ] <- eDamageSourceId.melee_pilot_emptyhanded
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +158 to +166
try{
player.StopSoundOnEntity( geigerSFX_1 )
player.StopSoundOnEntity( geigerSFX_2 )
player.StopSoundOnEntity( geigerSFX_3 )
}
catch( aaaaaaaaa )
{
print( aaaaaaaaa )
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the error here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgor

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works so I wouldn't want to touch it.

Comment on lines +104 to +110
struct MyFile
{
entity camera
vector skycam_origin
vector skycam_angles
}
MyFile file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me when respawn devs don't even bother renaming copy pasted code

Comment on lines +283 to +286
void function EmptyFunc()
{

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is respawn like this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😅
I did that

@uniboi
Copy link
Contributor

uniboi commented Nov 3, 2022

I made a quick script that helps to compare coop changes to vanilla scripts.

Windows

mkdir cdiffs
cd cdiffs
git clone https://github.com/xamionex/NorthstarMods -b co-op
git clone https://gist.github.com/uniboi/8dda378adc18aeeb11892abe66e3774f
curl https://salzgrube.club/static/assets_dump.zip -o assets_dump.zip
powershell -command "Expand-Archive -Force './assets_dump.zip' '.'"
py 8dda378adc18aeeb11892abe66e3774f/create_diff_folder.py

Linux

mkdir cdiffs
cd cdiffs
git clone https://github.com/xamionex/NorthstarMods -b co-op
wget salzgrube.club/static/assets_dump.zip
unzip assets_dump.zip
git clone https://gist.github.com/uniboi/8dda378adc18aeeb11892abe66e3774f
python3 ./8dda378adc18aeeb11892abe66e3774f/create_diff_folder.py

VSCode has a compare function built in. Simply select select for compare on the vanilla file and compare with selected on the coop file.
image
image
image

@DxsSucuk
Copy link

Is there any update related to this PR?

@DxsSucuk
Copy link

DxsSucuk commented Jan 26, 2023

I made a docker image based on pg9182 Dedicated Server.
You can check out the Fork here and the docker Image link is here ghcr.io/dxssucuk/northstar-dedicated-dev:dev.20230119.git8ba3d73

Also there is a packed Northstar instance with the coop mod here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Co-Op crashes
10 participants