Skip to content

Commit

Permalink
fix: update fork and cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuhis committed Jan 9, 2024
1 parent 3cd949c commit 92e5a21
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: SeriousProton Checkout
uses: actions/checkout@v2
with:
repository: daid/SeriousProton
repository: TheGalacticCouncil/SeriousProton
path: SeriousProton
ref: master
- name: EmptyEpsilon Checkout
Expand All @@ -55,7 +55,7 @@ jobs:
- name: SeriousProton Checkout
uses: actions/checkout@v2
with:
repository: daid/SeriousProton
repository: TheGalacticCouncil/SeriousProton
path: SeriousProton
ref: master
- name: EmptyEpsilon Checkout
Expand All @@ -78,7 +78,7 @@ jobs:
steps:
- name: Dependencies
run: |
$sdl_version = "2.0.16"
$sdl_version = "2.28.5"
$sdl_link = "https://libsdl.org/release/SDL2-devel-$sdl_version-VC.zip"
$sdl_zip = "$env:GITHUB_WORKSPACE/sdl-dev.zip"
(new-object System.Net.WebClient).DownloadFile($sdl_link, $sdl_zip)
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
- name: SeriousProton Checkout
uses: actions/checkout@v2
with:
repository: daid/SeriousProton
repository: TheGalacticCouncil/SeriousProton
path: SeriousProton
ref: master
- name: Create Build Environment
Expand Down
4 changes: 2 additions & 2 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ do
continue
fi
SERIOUS_PROTON_BRANCH="${git_ref_name}"
output="$(git ls-remote --heads https://github.com/Daid/SeriousProton "${SERIOUS_PROTON_BRANCH}")"
output="$(git ls-remote --heads https://github.com/TheGalacticCouncil/SeriousProton "${SERIOUS_PROTON_BRANCH}")"
if [ -n "${output}" ]; then
echo "Found SeriousProton branch [${SERIOUS_PROTON_BRANCH}]."
break
Expand All @@ -35,7 +35,7 @@ done

echo "Using SeriousProton branch ${SERIOUS_PROTON_BRANCH} ..."

git clone --depth=1 -b "${SERIOUS_PROTON_BRANCH}" https://github.com/Daid/SeriousProton.git "${PROJECT_DIR}"/SeriousProton
git clone --depth=1 -b "${SERIOUS_PROTON_BRANCH}" https://github.com/TheGalacticCouncil/SeriousProton.git "${PROJECT_DIR}"/SeriousProton

mkdir build
cd build
Expand Down
2 changes: 1 addition & 1 deletion src/screenComponents/shieldFreqencySelect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GuiShieldFrequencySelect::GuiShieldFrequencySelect(GuiContainer* owner, string i

new_frequency = new GuiSelector(calibration_row, "", [this](int selected_shield_frequency, string value) {
if (my_spaceship) {
my_spaceship->selected_shield_frequency = selected_shield_frequency;
my_spaceship->commandSetShieldFrequencySelection(selected_shield_frequency);
}
});
new_frequency->setSize(120, 50);
Expand Down
14 changes: 10 additions & 4 deletions src/spaceObjects/playerSpaceship.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1863,22 +1863,26 @@ void PlayerSpaceship::onReceiveClientCommand(int32_t client_id, sp::io::DataBuff
int32_t new_frequency;
packet >> new_frequency;

if (new_frequency < 0)
selected_shield_frequency = new_frequency;

if (selected_shield_frequency < 0)
selected_shield_frequency = 0;
if (new_frequency > SpaceShip::max_frequency)
if (selected_shield_frequency > SpaceShip::max_frequency)
selected_shield_frequency = SpaceShip::max_frequency;
else
selected_shield_frequency = new_frequency;
}
break;
case CMD_SET_NEXT_SHIELD_FREQUENCY_SELECTION:
std::cout << "processing CMD_SET_NEXT_SHIELD_FREQUENCY_SELECTION" << std::endl;
std::cout << selected_shield_frequency << std::endl;
if (shield_calibration_delay <= 0.0) // TODO: Is it ok to change target while calibrating? I'd say no.
{
if (selected_shield_frequency != SpaceShip::max_frequency)
++selected_shield_frequency;
}
break;
case CMD_SET_PREVIOUS_SHIELD_FREQUENCY_SELECTION:
std::cout << "processing CMD_SET_PREVIOUS_SHIELD_FREQUENCY_SELECTION" << std::endl;
std::cout << selected_shield_frequency << std::endl;
if (shield_calibration_delay <= 0.0) // TODO: Is it ok to change target while calibrating? I'd say no.
{
if (selected_shield_frequency != 0)
Expand Down Expand Up @@ -2356,13 +2360,15 @@ void PlayerSpaceship::commandSetShieldFrequencySelection(int32_t frequency)

void PlayerSpaceship::commandSetNextShieldFrequencySelection()
{
std::cout << "commandSetNextShieldFrequencySelection() called" << std::endl;
sp::io::DataBuffer packet;
packet << CMD_SET_NEXT_SHIELD_FREQUENCY_SELECTION;
sendClientCommand(packet);
}

void PlayerSpaceship::commandSetPreviousShieldFrequencySelection()
{
std::cout << "commandSetPreviousShieldFrequencySelection() called" << std::endl;
sp::io::DataBuffer packet;
packet << CMD_SET_PREVIOUS_SHIELD_FREQUENCY_SELECTION;
sendClientCommand(packet);
Expand Down

0 comments on commit 92e5a21

Please sign in to comment.