Compare commits

..

22 commits

Author SHA1 Message Date
Yamagi
b315ef2993 Update the CHANGELOG. 2025-04-02 11:20:03 +02:00
Yamagi
868978ad84 Fix (potential) problematic use cases of qboolean.
xatrix had only one potential problematic use case, putting an int into
qboolean. It would have worked if qboolean is a bool, but better do it
right. No functional change intended.
2025-03-15 17:21:47 +01:00
Yamagi
2e95d187b5
Merge pull request #103 from BjossiAlfreds/door-use-fix
Fixed doors being unusable with NULL activator
2025-03-01 16:49:11 +01:00
Yamagi
f75a0e16f1 Fix build with C23 by reusing the predefined bool type. 2025-03-01 12:42:21 +01:00
Yamagi
26d8292829 Follow yquake2 and don't force a C standard in Makefile and CMakeLists.
This reverts 6482460.
2025-03-01 12:41:17 +01:00
BjossiAlfreds
026be478dd Fixed doors being unusable with NULL activator 2025-02-24 15:43:07 +00:00
Yamagi
64824600d1 Force C standard to gnu99 in cmake builds.
The Makefiles forces gnu99 since ages. Additionally gcc15 started to
default to C23 and our code doesn't (yet) build with it.
2025-02-22 11:43:01 +01:00
Yamagi
6ca882da1f Fix a typo. 2025-02-09 11:30:54 +01:00
Yamagi
28d4e362ed Add a Win64 workflow file. 2025-02-09 11:24:43 +01:00
Yamagi
a24ceb45b4 Add a Linux/aarch64 workflow file. 2025-02-09 11:23:10 +01:00
Yamagi
a6a7521ded Rename the Linux/x86_64 workflow file.
This is a preparation of an upcoming Linux/aarch64 build. While here
switch back to Ubuntu 22.04 as builder, we should use the same Ubuntu
version everywhere.
2025-02-09 11:22:47 +01:00
Yamagi
7b6b787c35 Update CI to use 4 CPUs on Linux and Windows. 2025-02-09 10:58:06 +01:00
Yamagi
d215802d16
Merge pull request #102 from protocultor/wpn_preview
Weapon preview for cycleweap
2024-12-21 09:52:30 +01:00
Jaime Moreira
6767664988 Weapon preview for cycleweap
'Pickup style' just like weapprev/weapnext, only works when cycleweap
is called with 3 or more parameters.
2024-12-04 19:00:43 -03:00
Yamagi
1957253b25 Mark g_swap_speed as CVAR_ARCHIVE. 2024-09-21 09:53:42 +02:00
Yamagi
16db9eab3f
Merge pull request #101 from BjossiAlfreds/spawntemp-leak-fix
Fixed spawntemp data leaking into mid-level spawned entities
2024-08-21 21:02:51 +02:00
Yamagi
de69b2a37d
Merge pull request #100 from devnexen/hunt_target_fix
backport yquake2 fix for HuntTarget unitialised vector
2024-08-18 17:05:34 +02:00
David Carlier
9fc912dc01
backport yquake2 fix for HuntTarget unitialised vector 2024-08-18 14:40:53 +01:00
BjossiAlfreds
6cfda5732d Fixed spawntemp data leaking into mid-level spawned entities 2024-08-12 16:31:04 +00:00
Yamagi
6fba354e60 There's no need to run brew upgrade. 2024-08-12 18:23:10 +02:00
Yamagi
68f407f16f Add CI workflows for Linux, MacOS and Windows.
This is equivalent to the CI workflows added to the yquake2 main
repository. The workflows are triggered on commit, for new pull
requests and when the pull request branch is updated. The CI is
mostly for providing users with up to date test builds.
2024-08-12 15:40:29 +02:00
Yamagi
69faeb6777 Modernize the README.
Convert to markdown and follow the same style as the yquake2 main
repository. Use it's resources were appropriate.
2024-08-12 15:31:59 +02:00
16 changed files with 385 additions and 71 deletions

46
.github/workflows/linux_aarch64.yml vendored Normal file
View file

@ -0,0 +1,46 @@
name: Testbuild for Linux (aarch64)
run-name: testbuild_linux_aarch64
on:
push:
branches:
- 'master'
pull_request:
types:
- edited
- opened
- synchronize
concurrency:
# Cancel concurrent workflows for the same PR or commit hash.
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
cancel-in-progress: true
jobs:
build_ubuntu_aarch64:
runs-on: ubuntu-22.04-arm
strategy:
fail-fast: false
matrix:
include:
- env: ubuntu
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Build
run: |
# Public runners come with 4 CPUs.
make -j4
- name: Create testbuild package
run: |
# Create release directory tree
mkdir -p publish/quake2-xatrix-linux_aarch64-${{github.sha}}/misc/docs
# Copy release assets
cp -r release/* publish/quake2-xatrix-linux_aarch64-${{github.sha}}/
# Copy misc assets
cp -r stuff/mapfixes publish/quake2-xatrix-linux_aarch64-${{github.sha}}/misc
cp LICENSE publish/quake2-xatrix-linux_aarch64-${{github.sha}}/misc/docs/LICENSE.txt
cp README.md publish/quake2-xatrix-linux_aarch64-${{github.sha}}/misc/docs/README.txt
- name: Upload testbuild package
uses: actions/upload-artifact@v4
with:
name: quake2-xatrix-linux_aarch64-${{github.sha}}
path: publish/
if-no-files-found: error

46
.github/workflows/linux_x86_64.yml vendored Normal file
View file

@ -0,0 +1,46 @@
name: Testbuild for Linux (x86_64)
run-name: testbuild_linux_x86_64
on:
push:
branches:
- 'master'
pull_request:
types:
- edited
- opened
- synchronize
concurrency:
# Cancel concurrent workflows for the same PR or commit hash.
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
cancel-in-progress: true
jobs:
build_ubuntu_x86_64:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- env: ubuntu
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Build
run: |
# Public runners come with 4 CPUs.
make -j4
- name: Create testbuild package
run: |
# Create release directory tree
mkdir -p publish/quake2-xatrix-linux_x86_64-${{github.sha}}/misc/docs
# Copy release assets
cp -r release/* publish/quake2-xatrix-linux_x86_64-${{github.sha}}/
# Copy misc assets
cp -r stuff/mapfixes publish/quake2-xatrix-linux_x86_64-${{github.sha}}/misc
cp LICENSE publish/quake2-xatrix-linux_x86_64-${{github.sha}}/misc/docs/LICENSE.txt
cp README.md publish/quake2-xatrix-linux_x86_64-${{github.sha}}/misc/docs/README.txt
- name: Upload testbuild package
uses: actions/upload-artifact@v4
with:
name: quake2-xatrix-linux_x86_64-${{github.sha}}
path: publish/
if-no-files-found: error

50
.github/workflows/macos.yml vendored Normal file
View file

@ -0,0 +1,50 @@
name: Testbuild for MacOS
run-name: testbuild_macos
on:
push:
branches:
- 'master'
pull_request:
types:
- edited
- opened
- synchronize
concurrency:
# Cancel concurrent workflows for the same PR or commit hash.
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
cancel-in-progress: true
jobs:
build_macos_aarch64:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
include:
- env: macos
steps:
- name: Install build dependencies
run: |
brew update
brew install make
- name: Check out repository code
uses: actions/checkout@v4
- name: Build
run: |
# Public runners come with 3 CPUs.
gmake -j3
- name: Create testbuild package
run: |
# Create release directory tree
mkdir -p publish/quake2-xatrix-macos-${{github.sha}}/misc/docs
# Copy release assets
cp -r release/* publish/quake2-xatrix-macos-${{github.sha}}/
# Copy misc assets
cp -r stuff/mapfixes publish/quake2-xatrix-macos-${{github.sha}}/misc
cp LICENSE publish/quake2-xatrix-macos-${{github.sha}}/misc/docs/LICENSE.txt
cp README.md publish/quake2-xatrix-macos-${{github.sha}}/misc/docs/README.txt
- name: Upload testbuild package
uses: actions/upload-artifact@v4
with:
name: quake2-xatrix-macos-${{github.sha}}
path: publish/
if-no-files-found: error

57
.github/workflows/win32.yml vendored Normal file
View file

@ -0,0 +1,57 @@
name: Testbuild for Win32
run-name: testbuild_win32
on:
push:
branches:
- 'master'
pull_request:
types:
- edited
- opened
- synchronize
concurrency:
# Cancel concurrent workflows for the same PR or commit hash.
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
cancel-in-progress: true
jobs:
build_mingw_x86_32:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- { sys: mingw32, env: i686 }
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
install: >-
git
make
mingw-w64-${{matrix.env}}-gcc
mingw-w64-${{matrix.env}}-make
- name: Check out repository code
uses: actions/checkout@v4
- name: Build
shell: msys2 {0}
run: |
# Public runners come with 4 CPUs.
make -j4
- name: Create testbuild package
shell: msys2 {0}
run: |
# Create release directory tree
mkdir -p publish/quake2-xatrix-win32-${{github.sha}}/misc/docs
# Copy release assets
cp -r release/* publish/quake2-xatrix-win32-${{github.sha}}/
# Copy misc assets
cp -r stuff/mapfixes publish/quake2-xatrix-win32-${{github.sha}}/misc
cp LICENSE publish/quake2-xatrix-win32-${{github.sha}}/misc/docs/LICENSE.txt
cp README.md publish/quake2-xatrix-win32-${{github.sha}}/misc/docs/README.txt
- name: Upload testbuild package
uses: actions/upload-artifact@v4
with:
name: quake2-xatrix-win32-${{github.sha}}
path: publish/
if-no-files-found: error

57
.github/workflows/win64.yml vendored Normal file
View file

@ -0,0 +1,57 @@
name: Testbuild for Win64
run-name: testbuild_win64
on:
push:
branches:
- 'master'
pull_request:
types:
- edited
- opened
- synchronize
concurrency:
# Cancel concurrent workflows for the same PR or commit hash.
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
cancel-in-progress: true
jobs:
build_mingw_x86_64:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- { sys: mingw64, env: x86_64 }
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
install: >-
git
make
mingw-w64-${{matrix.env}}-gcc
mingw-w64-${{matrix.env}}-make
- name: Check out repository code
uses: actions/checkout@v4
- name: Build
shell: msys2 {0}
run: |
# Public runners come with 4 CPUs.
make -j4
- name: Create testbuild package
shell: msys2 {0}
run: |
# Create release directory tree
mkdir -p publish/quake2-xatrix-win64-${{github.sha}}/misc/docs
# Copy release assets
cp -r release/* publish/quake2-xatrix-win64-${{github.sha}}/
# Copy misc assets
cp -r stuff/mapfixes publish/quake2-xatrix-win64-${{github.sha}}/misc
cp LICENSE publish/quake2-xatrix-win64-${{github.sha}}/misc/docs/LICENSE.txt
cp README.md publish/quake2-xatrix-win64-${{github.sha}}/misc/docs/README.txt
- name: Upload testbuild package
uses: actions/upload-artifact@v4
with:
name: quake2-xatrix-win64-${{github.sha}}
path: publish/
if-no-files-found: error

View file

@ -1,3 +1,8 @@
The Reckoning 2.13 to 2.14:
- Add weapon preview to the `cycleweap` command (by protocultor)
- Fix leaking temporary spawnflags into entities spawned mid-level. (by
BjossiAlfreds)
The Reckoning 2.12 to 2.13:
- Implement `g_quick_weap`. If set to 1, both weapprev and weapnext
commands will count how many times they have been called, making

View file

@ -88,7 +88,7 @@ endif
# to get it there...
# -fwrapv for defined integer wrapping. MSVC6 did this
# and the game code requires it.
override CFLAGS += -std=gnu99 -fno-strict-aliasing -fwrapv
override CFLAGS += -fno-strict-aliasing -fwrapv
# -MMD to generate header dependencies. Unsupported by
# the Clang shipped with OS X.

50
README
View file

@ -1,50 +0,0 @@
This is a bugfixed version of id Software's Quake II missionpack
"The Reckoning", developed by Xatrix Software. Hundred bugs were
fixed, this version should run much more stable than the the old
SDK version. It should be used with the "Yamagi Quake II Client",
but may work with other clients too. For more information visit
http://www.yamagi.org/quake2.
Installation for FreeBSD, Linux and OpenBSD:
--------------------------------------------
1. Type "make" or "gmake" to compile the game.so.
2. Create a subdirectory xatrix/ in your quake2 directory.
3. Copy pak0.pak and videos/ from the the Reckoning CD to
the newly created directory xatrix/.
4. Copy release/game.so to xatrix/.
5. Start the game with "./quake2 +set game xatrix"
Installation for OS X:
----------------------
1. Create a subdirectory xatrix/ in your quake2 directory.
2. Copy pak0.pak and videos/ from the the Reckoning CD to
the newly created directory xatrix/.
3. Copy game.so from the zip-archive to xatrix/.
4. Start the game with "quake2 +set game xatrix"
If you want to compile 'xatrix' for OS X from source, please take a
look at the "Installation" section of the README of the Yamagi Quake II
client. In the same file the integration into an app-bundle is
explained.
Installation for Windows:
-------------------------
1. Create a subdirectory xatrix\ in your quake2 directory.
2. Copy pak0.pak and videos\ from the the Reckoning CD to
the newly created directory xatrix\.
3. Copy game.dll from the zip-archive to xatrix/.
4. Start the game with "quake2.exe +set game xatrix"
If you want to compile 'xatrix' for Windows from source, please take a
look at the "Installation" section of the README of the Yamagi Quake II
client. There's descripted how to setup the build environment.
=======================================================================
FAQ
---
The sounds after starting "xship" aka "Stroggos Freightener" are
distorted and hurting my ears.
- Yeah, the quality of the sound samples is very low. Not much
we can do about it...

67
README.md Normal file
View file

@ -0,0 +1,67 @@
# The Reckoning for Yamagi Quake II
The Reckoning for Yamagi Quake II is a bugfixed version of the first
official missionpack released for Quake II. It's based upon the Quake
II SDK source code and licensed under GPL version 2:
* [LICENSE](https://github.com/yquake2/xatrix/blob/master/LICENSE)
Hundreds of bugs were fixed and some convenience features added. The
missionpack is intended to be used with Yamagi Quake II, but it's also
fully backward compatible with the last Quake II pointrelease 3.20 and
may work with other source ports.
Officially supported operating systems are:
* FreeBSD
* Linux
* Windows
Beside theses The Reckoning for Yamagi Quake II has community support
for MacOS and most other unixoid operating systems, including NetBSD,
OpenBSD and Solaris.
## Development
The Reckoning for Yamagi Quake II is a community driven project and
lives from community involvement. Please report bugs in our issue
tracker:
* [Issue Tracker](https://github.com/yquake2/xatrix/issues)
We are always open to code contributions, no matter if they are small
bugfixes or bigger features. However, Yamagi Quake II is a conservative
project with big focus on stability and backward compatibility. We don't
accept breaking changes. When in doubt please open an issue and ask if a
contribution in welcome before putting too much work into it. Open a
pull request to submit code:
* [Pull Requests](https://github.com/yquake2/xatrix/pulls)
Also have a look at our contributors guide:
* [Contributors Guide](https://github.com/yquake2/yquake2/blob/master/doc/080_contributing.md)
## Documentation
Yamagi Quake II has rather extensive documentation covering all relevant
areas from installation and configuration to package building. Have a
look at the documentation index:
* [Documentation Index](https://github.com/yquake2/yquake2/blob/master/doc/010_index.md)
## Releases
The Reckoning for Yamagi Quake II releases at an irregular schedule. The
official releases with source code tarballs and prebuild Windows
binaries can be found at the homepage:
* [Homepage](https://www.yamagi.org/quake2/)
Our CI builds **unsupported** Linux, MacOS and Windows binaries at every
commit. The artifacts can be found here:
* [Github Actions](https://github.com/yquake2/xatrix/actions)

View file

@ -390,6 +390,10 @@ HuntTarget(edict_t *self)
{
VectorSubtract(self->enemy->s.origin, self->s.origin, vec);
}
else
{
VectorClear(vec);
}
self->ideal_yaw = vectoyaw(vec);

View file

@ -1630,29 +1630,37 @@ void
Cmd_CycleWeap_f(edict_t *ent)
{
gitem_t *weap;
gclient_t *cl;
int num_weaps;
if (!ent)
{
return;
}
if (gi.argc() <= 1)
num_weaps = gi.argc();
if (num_weaps <= 1)
{
gi.cprintf(ent, PRINT_HIGH, "Usage: cycleweap classname1 classname2 .. classnameN\n");
return;
}
weap = cycle_weapon(ent);
if (weap)
if (!weap) return;
cl = ent->client;
if (cl->pers.inventory[ITEM_INDEX(weap)] <= 0)
{
if (ent->client->pers.inventory[ITEM_INDEX(weap)] <= 0)
{
gi.cprintf(ent, PRINT_HIGH, "Out of item: %s\n", weap->pickup_name);
}
else
{
weap->use(ent, weap);
}
gi.cprintf(ent, PRINT_HIGH, "Out of item: %s\n", weap->pickup_name);
return;
}
weap->use(ent, weap);
if (num_weaps > 3 && cl->newweapon == weap)
{
cl->ps.stats[STAT_PICKUP_ICON] = gi.imageindex(weap->icon);
cl->ps.stats[STAT_PICKUP_STRING] = CS_ITEMS + ITEM_INDEX(weap);
cl->pickup_msg_time = level.time + 0.7f;
}
}

View file

@ -1401,13 +1401,13 @@ door_go_up(edict_t *self, edict_t *activator)
void
door_use(edict_t *self, edict_t *other /* unused */, edict_t *activator)
{
if (!self || !activator)
edict_t *ent;
if (!self)
{
return;
}
edict_t *ent;
if (self->flags & FL_TEAMSLAVE)
{
return;
@ -2446,13 +2446,22 @@ void
trigger_elevator_use(edict_t *self, edict_t *other, edict_t *activator /* unused */)
{
edict_t *target;
edict_t *train;
if (!self || !other)
{
return;
}
if (self->movetarget->nextthink)
train = self->movetarget;
if (!train || !train->inuse ||
!train->classname || strcmp(train->classname, "func_train") != 0)
{
return;
}
if (train->nextthink)
{
return;
}
@ -2471,8 +2480,8 @@ trigger_elevator_use(edict_t *self, edict_t *other, edict_t *activator /* unused
return;
}
self->movetarget->target_ent = target;
train_resume(self->movetarget);
train->target_ent = target;
train_resume(train);
}
void

View file

@ -744,6 +744,9 @@ SpawnEntities(const char *mapname, char *entities, const char *spawnpoint)
ED_CallSpawn(ent);
}
/* in case the last entity in the entstring has spawntemp fields */
memset(&st, 0, sizeof(st));
gi.dprintf("%i entities inhibited.\n", inhibit);
G_FindTeams();

View file

@ -159,11 +159,11 @@ SV_FilterPacket(char *from)
{
if ((in & ipfilters[i].mask) == ipfilters[i].compare)
{
return (int)filterban->value;
return (filterban->value != 0);
}
}
return (int)!filterban->value;
return (filterban->value == 0);
}
void

View file

@ -18,8 +18,20 @@
#include <stdlib.h>
#include <time.h>
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L // C23 or newer
typedef bool qboolean;
#else
#ifdef true
#undef true
#endif
#ifdef false
#undef false
#endif
typedef enum {false, true} qboolean;
#endif
typedef unsigned char byte;
typedef enum {false, true} qboolean;
#ifndef NULL
#define NULL ((void *)0)

View file

@ -256,7 +256,7 @@ InitGame(void)
aimfix = gi.cvar("aimfix", "0", CVAR_ARCHIVE);
g_machinegun_norecoil = gi.cvar("g_machinegun_norecoil", "0", CVAR_ARCHIVE);
g_quick_weap = gi.cvar("g_quick_weap", "1", CVAR_ARCHIVE);
g_swap_speed = gi.cvar("g_swap_speed", "1", 0);
g_swap_speed = gi.cvar("g_swap_speed", "1", CVAR_ARCHIVE);
/* items */
InitItems ();