Skip to content

Commit

Permalink
Merge branch 'spirit/spirit-1.2' into spirit/spirit-1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
LogicAndTrick committed Jul 20, 2024
2 parents e32be71 + 5330c44 commit 1160488
Show file tree
Hide file tree
Showing 33 changed files with 1,073 additions and 432 deletions.
47 changes: 28 additions & 19 deletions .github/workflows/spirit-updated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,55 @@ jobs:
linux:
name: Linux-x86
runs-on: ubuntu-latest
env:
CONFIGURATION: release
strategy:
matrix:
compiler: [g++, clang++]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update system
run: sudo apt update
- name: Install G++ Multilib
run: sudo apt install -y g++-multilib libgl1-mesa-dev libglu1-mesa-dev
uses: actions/checkout@v4

- name: Install G++ Multilib, Clang++ & OpenGL library
run: |
sudo apt update
sudo apt install -y g++-multilib clang libgl1-mesa-dev libglu1-mesa-dev
- name: Build
run: cd linux && CFG=release make
run: |
cd linux
make COMPILER=${{ matrix.compiler }} CFG=release -j2
- name: Deploy
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Linux-x86
name: Linux-x86-${{ matrix.compiler }}
path: |
linux/release/client.so
linux/release/client.so.dbg
linux/release/spirit.so
linux/release/spirit.so.dbg
win32:
name: Win32
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x86

- name: Build
run: MSBuild.exe projects/vs2019/projects.sln /p:Configuration=Release /p:Platform=Win32
run: msbuild projects/vs2019/projects.sln -t:rebuild -property:Configuration=Release -maxcpucount:2

- name: Deploy
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Win32
path: |
projects/vs2019/Release/hl_cdll/client.dll
projects/vs2019/Release/hl_cdll/client.exp
projects/vs2019/Release/hl_cdll/client.lib
projects/vs2019/Release/hl_cdll/client.pdb
projects/vs2019/Release/hldll/spirit.dll
projects/vs2019/Release/hldll/spirit.exp
projects/vs2019/Release/hldll/spirit.lib
projects/vs2019/Release/hldll/spirit.pdb
projects/vs2019/Release/hldll/spirit.pdb
9 changes: 9 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,12 @@
## Building

The TWHL tutorial on setting up the Half-Life SDK for C++ mod development explains how to set up the source code and how to configure the mod installation: https://twhl.info/wiki/page/Half-Life_Programming_-_Getting_Started

## Packaging mod files

To package a mod for distribution as an archive, use the `CreatePackage` script:

```
cd path/to/Half-Life
dotnet script halflife_updated/scripts/packager/CreatePackage.csx --package-name <name of archive file excluding file extension>
```
350 changes: 201 additions & 149 deletions CHANGELOG.md

Large diffs are not rendered by default.

273 changes: 161 additions & 112 deletions FULL_CHANGELOG.md → FULL_UPDATED_CHANGELOG.md

Large diffs are not rendered by default.

193 changes: 189 additions & 4 deletions INSTALL.md

Large diffs are not rendered by default.

119 changes: 90 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
About
======================
# About

[Half-Life Updated](https://github.com/SamVanheer/halflife-updated), [Opposing Force Updated](https://github.com/SamVanheer/halflife-op4-updated) and [Blue Shift Updated](https://github.com/SamVanheer/halflife-bs-updated) are repositories that provide updated versions of the Half-Life SDK, targeted to the 3 Half-Life 1 PC games officially available.
[Half-Life Updated](https://github.com/twhl-community/halflife-updated), [Opposing Force Updated](https://github.com/twhl-community/halflife-op4-updated) and [Blue Shift Updated](https://github.com/twhl-community/halflife-bs-updated) are repositories that provide updated versions of the Half-Life SDK, targeted to the 3 Half-Life 1 PC games officially available.

Purpose
======================
# Purpose

Each repository provides project files compatible with Visual Studio 2019 and 2022, as well as bug fixes. The Opposing Force and Blue Shift projects are reference implementations of their respective games. This means they provide the original features, implemented as they are in the original games, including the many cases of code duplication.

The goal of the Updated repositories is to allow modders to make mods based on these games, while providing bug fixes that could be applied to the official games as well. A mod installation is also provided for each repository to allow players to play these games with all bug fixes applied.

This mod installation includes files that are required when making a mod based on these SDKs.

The **scope** of the Updated projects is **limited to bug fixes**, **feature requests to improve the game's code** and **fixing game-breaking bugs in the game assets** (e.g. soft-locked trigger setups). Changes like **graphical upgrades**, **physics engine changes** and other **engine changes** are **out of scope**.
The following types of changes are **in scope** for this project:
* Bug fixes
* Features to improve the game's code (refactoring, generalizing, simplifying). This does not include complete redesigns of systems as this makes it much harder for modders to integrate changes and get started with Half-Life modding
* Fixing game-breaking bugs in game assets (e.g. soft-locked trigger setups)

The following types of changes are **out of scope**:
* Graphical upgrades
* Physics engine changes
* Other engine changes
* Gameplay changes

If you need help setting up the SDK or developing a mod please ask on the [TWHL website](https://twhl.info/) or on its [Discord server](https://discord.gg/jEw8EqD).

Expand All @@ -22,48 +29,41 @@ See the `#welcome` channel for more information about the Discord server. Please

See the TWHL thread for status updates about these projects: https://twhl.info/thread/view/20055

Requirements to run mods built with this SDK
======================
# Requirements to run mods built with this SDK

Only the latest Steam version of Half-Life is supported. For the Opposing Force and Blue Shift repositories you will need to own the games and have them installed to use their assets.

Building this SDK
======================
# Building this SDK

See [BUILDING.md](BUILDING.md)

Mod installation instructions
======================
# Mod installation instructions

See [INSTALL.md](INSTALL.md)

What isn't supported
======================
# What isn't supported

Backwards compatibility with WON and older versions of Steam Half-Life is not supported. Xash isn't supported, but may work. You cannot use Updated clients to play on vanilla servers, you also cannot use vanilla clients to play on Updated servers.

Placing Updated game dlls in vanilla installations is not supported.

These repositories have a limited scope and will not have major changes applied.

Deathmatch Classic and Ricochet
======================
# Deathmatch Classic and Ricochet

The source code for Deathmatch Classic and Ricochet is in the original Half-Life SDK. The purpose of these updated repositories is to provide updated versions only for Half-Life and its expansion packs, so the source code for these mods has been removed.

Since the vanilla versions don't compile under newer versions of Visual Studio separate repositories have been made that provide the same updates to make them compile:
* https://github.com/SamVanheer/dmc-updated
* https://github.com/SamVanheer/ricochet-updated
* https://github.com/twhl-community/dmc-updated
* https://github.com/twhl-community/ricochet-updated

Unlike the other updated repositories these only provide basic fixes. No further development and support will be provided.

Changelog
======================
# Changelog

See [CHANGELOG.md](CHANGELOG.md) and [FULL_CHANGELOG.md](FULL_CHANGELOG.md)
See [CHANGELOG.md](CHANGELOG.md) and [FULL_UPDATED_CHANGELOG.md](FULL_UPDATED_CHANGELOG.md)

Half Life 1 SDK LICENSE
======================
# Half Life 1 SDK LICENSE

Half Life 1 SDK Copyright© Valve Corp.

Expand All @@ -83,15 +83,13 @@ LIMITATION OF LIABILITY. IN NO EVENT SHALL VALVE OR ITS SUPPLIERS BE LIABLE FOR
If you would like to use the SDK for a commercial purpose, please contact Valve at sourceengine@valvesoftware.com.


Half-Life 1
======================
# Half-Life 1

This is the README for the Half-Life 1 engine and its associated games.

Please use this repository to report bugs and feature requests for Half-Life 1 related products.

Reporting Issues
----------------
## Reporting Issues

If you encounter an issue while using Half-Life 1 games, first search the [issue list](https://github.com/ValveSoftware/halflife/issues) to see if it has already been reported. Include closed issues in your search.

Expand All @@ -107,8 +105,7 @@ Please place logs either in a code block (press `M` in your browser for a GFM ch

\* The preferred and easiest way to get this information is from Steam's Hardware Information viewer from the menu (`Help -> System Information`). Once your information appears: right-click within the dialog, choose `Select All`, right-click again, and then choose `Copy`. Paste this information into your report, preferably in a code block.

Conduct
-------
## Conduct


There are basic rules of conduct that should be followed at all times by everyone participating in the discussions. While this is generally a relaxed environment, please remember the following:
Expand All @@ -119,3 +116,67 @@ There are basic rules of conduct that should be followed at all times by everyon
- Do not repeatedly update an open issue remarking that the issue persists.

Remember: Just because the issue you reported was reported here does not mean that it is an issue with Half-Life. As well, should your issue not be resolved immediately, it does not mean that a resolution is not being researched or tested. Patience is always appreciated.

# Contributors

This is a list of everybody who contributed to these projects. Thanks for helping to make them better!

If you believe your name should be on this list make sure to let us know!

* Sam Vanheer
* JoelTroch
* malortie
* dtugend
* Revenant100
* fel1x-developer
* LogicAndTrick
* FreeSlave
* zpl-zak
* edgarbarney
* Toodles2You
* Jengerer
* thefoofighter
* Maxxiii
* johndrinkwater
* anchurcn
* DanielOaks
* MegaBrutal
* suXinjke
* IntriguingTiles
* Oxofemple
* YaLTeR
* Ronin4862
* the man
* vasiavasiavasia95
* NongBenz
* Hezus
* Anton
* ArroganceJustified
* a1batross
* zaklaus
* Uncle Mike
* Bacontsu
* L453rh4wk
* P38TaKjYzY
* hammermaps
* LuckNukeHunter99
* Veinhelm
* jay!
* BryanHaley
* λλλλλλ
* Streit
* rbar1um43
* LambdaLuke87
* almix
* sabian

## Special Thanks

* Valve Software
* Gearbox Software
* Alfred Reynolds
* mikela-valve
* TWHL Community
* Knockout
* Gamebanana
* ModDB
18 changes: 12 additions & 6 deletions cl_dll/StudioModelRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,11 +951,15 @@ void CStudioModelRenderer::StudioSetupBones()

for (i = 0; i < m_pStudioHeader->numbones; i++)
{
if (0 == strcmp(pbones[i].name, "Bip01 Spine"))
auto bone = &pbones[i];

if (0 == strcmp(bone->name, "Bip01 Spine"))
{
copy = false;
}
else if (0 == strcmp(pbones[pbones[i].parent].name, "Bip01 Pelvis"))
else if (bone->parent >= 0 &&
bone->parent < m_pStudioHeader->numbones &&
0 == strcmp(pbones[bone->parent].name, "Bip01 Pelvis"))
{
copy = true;
}
Expand All @@ -970,13 +974,15 @@ void CStudioModelRenderer::StudioSetupBones()

for (i = 0; i < m_pStudioHeader->numbones; i++)
{
const int parent = pbones[i].parent;

QuaternionMatrix(q[i], bonematrix);

bonematrix[0][3] = pos[i][0];
bonematrix[1][3] = pos[i][1];
bonematrix[2][3] = pos[i][2];

if (pbones[i].parent == -1)
if (parent == -1)
{
if (0 != IEngineStudio.IsHardware())
{
Expand All @@ -995,10 +1001,10 @@ void CStudioModelRenderer::StudioSetupBones()
// Apply client-side effects to the transformation matrix
StudioFxTransform(m_pCurrentEntity, (*m_pbonetransform)[i]);
}
else
else if (parent >= 0 && parent < m_pStudioHeader->numbones)
{
ConcatTransforms((*m_pbonetransform)[pbones[i].parent], bonematrix, (*m_pbonetransform)[i]);
ConcatTransforms((*m_plighttransform)[pbones[i].parent], bonematrix, (*m_plighttransform)[i]);
ConcatTransforms((*m_pbonetransform)[parent], bonematrix, (*m_pbonetransform)[i]);
ConcatTransforms((*m_plighttransform)[parent], bonematrix, (*m_plighttransform)[i]);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions cl_dll/ammohistory.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class HistoryResource
void Reset()
{
memset(rgAmmoHistory, 0, sizeof rgAmmoHistory);
iCurrentHistorySlot = 0;
}

int iHistoryGap;
Expand Down
Loading

0 comments on commit 1160488

Please sign in to comment.